mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 10:55:56 +03:00
[GH-ISSUE #869] problem with advanced search (find nothing) #580
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#580
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robdi123 on GitHub (Oct 17, 2022).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/869
root search works excelent but advanced search brings nothings and i have an error on the console related to de JSON.
i hope someone can help me. thanks.
@rizrmd commented on GitHub (Nov 5, 2022):
I think the problem lies here:
github.com/prasathmani/tinyfilemanager@2c0e6d216e/tinyfilemanager.php (L3023)Somehow RegexIterator is not picking up right file for searches.
@rizrmd commented on GitHub (Nov 5, 2022):
Naah.
This is the problem: ajax searches is being preceded by another ajax request and never executed, so the solution is just to move ajax search to the top
@robdi123 commented on GitHub (Nov 7, 2022):
hi, thanks for the answer. so you mean i should move the fm_search function to the top?
@rizrmd commented on GitHub (Nov 7, 2022):
I mean, add this:
before this:
github.com/prasathmani/tinyfilemanager@2c0e6d216e/tinyfilemanager.php (L426)That should fix this issue. I'm sorry for putting it right here instead of proper pull request.
@rizrmd commented on GitHub (Nov 7, 2022):
I just created ad-hoc pull request https://github.com/prasathmani/tinyfilemanager/pull/878
@robdi123 commented on GitHub (Nov 7, 2022):
now i have error 500... sorry i have no experience with ajax.

@rizrmd commented on GitHub (Nov 7, 2022):
Can you show response body of that 500 error ? You can open network tab, click item that has red color (500 error) and show the body
@robdi123 commented on GitHub (Nov 7, 2022):
is this?
Thanks.
@rizrmd commented on GitHub (Nov 7, 2022):
Sorry, I mean request and response body, not the header. After you click that, make sure to screenshot "Request" and "Response" Tab
@robdi123 commented on GitHub (Nov 8, 2022):
as response it show my header
i cant find the request tab
Thanks!
@rizrmd commented on GitHub (Nov 8, 2022):
I mean Payload
@robdi123 commented on GitHub (Nov 8, 2022):
😄
@rizrmd commented on GitHub (Nov 8, 2022):
Are you sure have done this ?
because it looks like your request just somehow skipped this line:
If you check in payload, we have $_POST['ajax'] and $_POST['type'] set to "search", It should work.
Maybe replace your tinyfilemanager.php with latest one from master branch.
@robdi123 commented on GitHub (Nov 8, 2022):
yes, i did that.

yesterday i compare the lastest file with mine one and thers not to many changes, all the changes are basically made by me (i modify the login, some icons, not to much)
@rizrmd commented on GitHub (Nov 8, 2022):
That's weird, I need to do some debugging. If you are available, I'm willing to help you with live coding session. It's convenient to use pop - maybe install it first on your desktop and then create a session with me.
@robdi123 commented on GitHub (Nov 8, 2022):
when can you help me? and how we can do it? i have the production site on my computer to.
@rizrmd commented on GitHub (Nov 8, 2022):
Okay, after we do our live session. It's concluded that tinyfilemanager cannot be "injected" to view or controller inside your framework. Because somehow $_POST is being modified and tinyfilemanager cannot see $_POST['ajax'] nor $_POST['type'].
So you should directly visit tinyfilemanager.php or embed it using
@robdi123 commented on GitHub (Nov 14, 2022):
@rizrmd Hi, i made it work with a controller, and advanced search work if i go in a folder, but it doesnt work on root 😮💨...
i think something here
<a class="dropdown-item" href="<?php echo $path2 = $path ? $path : '.'; ?>is not working for me, do you have any idea of what can be wrong?Tnaks in advanc.
@AwaisHaider1 commented on GitHub (Nov 28, 2022):
@robdi123 For advanced search to work also in the root folder just remove the condition in scan function.
@prasathmani commented on GitHub (Nov 28, 2022):
@AwaisHaider1 thanks for the answer, it is already fixed in latest version.
@robdi123 commented on GitHub (Dec 16, 2022):
Thanks!!! it works!