Repository: jeroennoten/Laravel-AdminLTE (language: php)

Issue:
[BUG] Sidebar Search generates invalid href url. 
### Describe the bug
There is a bug in sidebar search. I tried to check in issues but could not found if it is already reported or not.
When you search any navigation item in sidebar search, it is generating wrong URL.

### Steps To Reproduce
Steps to reproduce the behavior:
1. Search 'Password' in sidebar search.
2. Click on 'Change Password' from generated list.
3. It will open URL with 'http://127.0.0.1:8000/http%3A/127.0.0.1%3A8000/admin/settings'.
4. See error 404.

### Expected behavior
This link should be generated like http://127.0.0.1:8000/admin/settings.

### Screenshots
![bug screenshot](https://user-images.githubusercontent.com/20887370/119219789-e1f31680-bb04-11eb-8b02-21f6742b1ee3.png)

### Environment
Complete the next environment information.

| Item    | Version
| ------- | -------
| Laravel | 8.42.1
| Project | 3.6.0 
| OS      | Windows 10



Discussion / hints:
@Jagdish-J-P This was a know bug on the underlying **AdminLTE v3.1** package. They already submit some fixes for it. Hopefully we see it fixed on the next release.

**Update:** I have give it a test on the current `dev-master` branch of **AdminLTE** and the problem is apparently solved, so we need to wait for the next release.
Para contornar temporariamente a situação:

1-) **faça um backup** e abra o arquivo /public/vendor/adminlte/dist/js/adminlte.min.js
2-) procure por **escape(a.link)** -> provavelmente estará na linha 6, coluna 32987, posição 33174
3-) substitua escape(a.link) por apenas **a.link**
4-) salve e dê reload na página (ctrl+f5)
5-) teste.

EN >>

Temp workaround for this miserable situation:

1-) **backup** and open file /public/vendor/adminlte/dist/js/adminlte.min.js
2-) search for **escape(a.link)** -> it will probably be in line 6, column 32987, position 33174
3-) replace escape(a.link) by just **a.link**
4-) save and reload on browser (ctrl+f5)
5-) test it.

> Para contornar temporariamente a situação:
> 
> 1-) **faça um backup** e abra o arquivo /public/vendor/adminlte/dist/js/adminlte.min.js
> 2-) procure por **escape(a.link)** -> provavelmente estará na linha 6, coluna 32987, posição 33174
> 3-) substitua escape(a.link) por apenas **a.link**
> 4-) salve e dê reload na página (ctrl+f5)
> 5-) teste.
> 
> EN >>
> 
> Temp workaround for this miserable situation:
> 
> 1-) **backup** and open file /public/vendor/adminlte/dist/js/adminlte.min.js
> 2-) search for **escape(a.link)** -> it will probably be in line 6, column 32987, position 33174
> 3-) replace escape(a.link) by just **a.link**
> 4-) save and reload on browser (ctrl+f5)
> 5-) test it.

It is so interesting the minification can bring in errors. Thanks for the walkaround till the official fix. 
Looks like this has now been fixed but in 3.2.* of AdminLTE. Is it likely to get pulled through to here any time soon?

https://github.com/ColorlibHQ/AdminLTE/pull/3557
@joe-er Actually, there is a [pre-release](https://github.com/ColorlibHQ/AdminLTE/releases/tag/v3.2.0-rc) of **AdminLTE v3.2**. When I get some time, I will try to test this pre-release, but we still need to wait for a new release.
@Shidersz ah very true - I missed that. Looking forward to them getting it sorted, can't wait :-)
@joe-er and others, I can confirm this is solved on the **pre-release** of **AdminLTE v3.2.0**. We going to wait to the release version, since there are some issues present on the **pre-release**.

Fix patch:
diff --git a/composer.json b/composer.json
index a7dfbda6..3f0b5698 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
   "require": {
     "laravel/framework": ">=6.0",
     "php": ">=7.2.0",
-    "almasaeed2010/adminlte": "3.1.*"
+    "almasaeed2010/adminlte": "3.2.*"
   },
   "require-dev": {
     "phpunit/phpunit": "^8.3",
diff --git a/resources/views/partials/cwrapper/cwrapper-iframe.blade.php b/resources/views/partials/cwrapper/cwrapper-iframe.blade.php
index 57603802..fbf62698 100644
--- a/resources/views/partials/cwrapper/cwrapper-iframe.blade.php
+++ b/resources/views/partials/cwrapper/cwrapper-iframe.blade.php
@@ -50,11 +50,14 @@
         @endif
 
         {{-- Tab List --}}
-        <ul class="navbar-nav" role="tablist">
+        <ul class="navbar-nav overflow-hidden" role="tablist">
 
             {{-- Default Tab --}}
             @if(! empty(config('adminlte.iframe.default_tab.url')))
                 <li class="nav-item active" role="presentation">
+                    <a href="#" class="btn-iframe-close" data-widget="iframe-close" data-type="only-this">
+                        <i class="fas fa-times"></i>
+                    </a>
                     <a id="tab-default" class="nav-link active" data-toggle="row" href="#panel-default"
                        role="tab" aria-controls="panel-default" aria-selected="true">
                         {{-- TODO: How to translate the configured title? --}}
@@ -84,12 +87,21 @@
     {{-- IFrame Tab Content --}}
     <div class="tab-content">
 
+        {{-- Loading Overlay --}}
+        <div class="tab-loading">
+        <div>
+            <h2 class="display-4 text-center">
+                <i class="fa fa-sync fa-spin text-secondary"></i>
+                <br/>
+                {{ __('adminlte::iframe.tab_loading') }}
+            </h2>
+        </div>
+        </div>
+
         {{-- Default Tab Content --}}
         @if(! empty(config('adminlte.iframe.default_tab.url')))
-            <div id="panel-default" class="tab-pane fade active show" role="tabpanel" aria-labelledby="tab-default">
-                {{-- TODO: Height can't be harcoded, because it depends on user screen size --}}
-                {{-- TODO: This should be fixed on the underlying AdminLTE package --}}
-                <iframe src="{{ config('adminlte.iframe.default_tab.url') }}" style="height: 671px;"></iframe>
+            <div id="panel-default" class="tab-pane fade" role="tabpanel" aria-labelledby="tab-default">
+                <iframe src="{{ config('adminlte.iframe.default_tab.url') }}"></iframe>
             </div>
         @endif
 
@@ -100,17 +112,6 @@
             </h2>
         </div>
 
-        {{-- Loading Overlay --}}
-        <div class="tab-loading">
-        <div>
-            <h2 class="display-4 text-center">
-                <i class="fa fa-sync fa-spin text-secondary"></i>
-                <br/>
-                {{ __('adminlte::iframe.tab_loading') }}
-            </h2>
-        </div>
-        </div>
-
     </div>
 
 </div>


Test patch: