• ie. if I search for “send_notification” without quotes of course, the result is no results found but If I search “notification” it finds all instances including “send_notification” which failed when searching directly. Is this normal behavior?

    Edit: seems to be anything with an ( _ ) underscore fails to be found. I’ll turn on wp debug and see if anything shows in the log and post back.

    • This topic was modified 7 years, 10 months ago by pingram. Reason: update
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Marius L. J.

    (@clorith)

    Hiya,

    That’s certainly not expected behavior, it shouldn’t matter if you have an underscore or not.

    I’ll have a look into this, thank you for the heads up!

    Plugin Author Marius L. J.

    (@clorith)

    Hi,

    Just wanted to let you know I’ve just released version 2.1.1, it has a fix for a regex search check that wasn’t always running as it should, and this issue was actually related.

    PHP accepts the quotes (") as wrappers for regex searches, which is why you’d get results when you wrapped your search as you did, but the underscores are treated differently, so it gives very strange behaviors.

    Now that regex checks are improved, you shouldn’t be having this issue ??

    Do let me know if you encounter any other issues (or if you just have a happy use story, those are always fantastic), and thanks for the patience as I got this all sorted out.

    Thread Starter pingram

    (@pingram3541)

    I said without quotes specifically so I don’t think that is the issue. Additionally I am not checking the regex option when I perform these searches. I updated to 2.1.1 but I still cannot seem to get any results. It just always says “Preparations completed, search started…”

    Plugin Author Marius L. J.

    (@clorith)

    Are you seeing any errors in your logs (you may have to enable debugging to see them) ?

    Thread Starter pingram

    (@pingram3541)

    No this time nothing in the debug.log like prior to the update so that appears to be fixed. I also checked the browser console and did not see any errors there.

    Intermittently if I wait long enough I’ll get some results and other times it doesn’t seem to matter how long I wait, the text “Preparations completed…” remains.

    Plugin Author Marius L. J.

    (@clorith)

    Hmm,

    If you do receive results if you wait long enough, it sounds like you may have a lot of files, and it’s taking a while to search them all.

    I may change the behavior here to have a fixed limit of files to search before sending a response back, as I can definitely see that as being confusing if there’s no feedback for a prolonged period of time.

    digitaltransformation

    (@digitaltransformation)

    Hi Marcus,

    I just tried the updated plugin. The first time I ran it, I ran it thru the whole directory and after about 30 seconds received the following.

    “Not Found
    The above error was returned by your server, for more details please consult your servers error logs.”

    But there was no detailed error shown.

    So I tried to search thru just “all themes” and it worked! I don’t have a lot of files, but I still think the issue might be the server timing out.

    This is super useful, thank you so much for updating this! I was able to find and fix what I was looking for in the theme in seconds.

    Bill

    Thread Starter pingram

    (@pingram3541)

    As I mentioned in another thread I had opened, I tested with a dummy theme folder and a single style.css file only just to be sure it wasn’t something like that, so unless it’s somehow not searching the chosen directory selected I don’t think that is the problem.

    Also, I DO NOT always get results if I wait long enough…but rather, only intermittently and rarely did I get results if I waited. I could walk away and come back 10min later and still no results. Being blind to what is going on in the background and needing to stay efficient I started executing queries with a 1 minute maximum duration and would otherwise try again if still nothing. When it does work, the results are almost immediate.

    I also tested within different installs on different hosting environments. One was apache while the other was nginx, one was php 5.6 and the other php7, different themes, all other plugins disabled…the only thing I haven’t tried yet due to lack of time is creating a fresh WP install to test in.

    Thread Starter pingram

    (@pingram3541)

    Curious what happens if an archive is encountered? Is the archive contents considered in the search and could this be causing the issue?

    On my test theme with only the style.css I had also zipped up all the other contents it had and cleared them out so only the style.css and archive.zip were present in the root folder. This was my way of a quick test, probably flawed thinking here =)

    I just saw in one of the premium themes I use (that also never produces results) that it’s file size when you consider the archived tgmp plugins it contains is upwards of 24mb, but that actual un-archived files is much much less at around 2.5mb.

    Moving the archive.zip out of that test theme folder now produces results from queries within the style.css file every time, yay! moving the archive back inside the folder, it slugs along and no results again.

    Thread Starter pingram

    (@pingram3541)

    Well scratch all that. I don’t know what I was thinking but a little more testing and it seems it has nothing to do with archives. I still can’t nail down why it sometimes works and other times it does not. I have 2 servers testing the same theme 24mb in size, searching for wp_enqueue:

    Server A:
    Operating System: Linux
    Software: nginx/1.10.0
    MySQL version: 5.5.5
    PHP Version: 7.0.7-4+deb.sury.org~trusty+1
    PHP Max Input Vars: 1000
    PHP Max Post Size: 100M
    Max Upload Size: 100 MB
    Memory limit: 40M

    Server B:
    Operating System: Linux
    Software: Apache
    MySQL version: 5.6.35
    PHP Version: 5.6.24
    PHP Max Input Vars: 8000
    PHP Max Post Size: 256M
    Max Upload Size: 256 MB
    Memory limit: 64M

    What is strange is that the first server w/ much less resources almost always completes the search query but the second server always fails and results with:

    Gateway Time-out
    The above error was returned by your server, for more details please consult your servers error logs.

    I don’t see anything in my logs or I don’t have access to the right ones.

    What is strange is that the first server w/ much less resources almost always completes the search query but the second server always fails and results with:

    Gateway Time-out
    The above error was returned by your server, for more details please consult your servers error logs.

    That’s because the second server uses Apache that by default uses more memory than the other web server (Nginx) used in the first server. Sorry to go off-topic. Just wanted to clarify!

    Thread Starter pingram

    (@pingram3541)

    Yes thank you, that is why I prefer Nginx or LightSpeed to Apache but this task should not exhaust that much memory.

    I am now even more perplexed as I tested on another sub-domain within that same Apache server environment, running the same theme and plugins, testing the same query on the same theme folder and I get results, not fast but results nonetheless. There has to be something else like corrupt files maybe.

    Thread Starter pingram

    (@pingram3541)

    Ok, increased the memory_limit to 256M and queries are showing up but still taking a really long time and eventually times out with an admin-ajax.php 504 Gateway Timeout error in the console. Additionally max_input_time and max_execution_time are both set to 10min (600).

    I think batching or being able to search specific folder paths might be a solution.

    • This reply was modified 7 years, 9 months ago by pingram.
    Plugin Author Marius L. J.

    (@clorith)

    Wow, I totally missed the conversation going on here (so sorry!)

    Archives are ignored in the search (this is a basic ignore, basically based on file extension based on the following_ 'rar', '7z', 'zip', 'tar', 'gz'

    The plugin does actually do batching, based on various elements such as available execution time, available memory and result length (there’s a database limitation we’re working around there when there are many files to check).

    I do believe this may be sorted in an update I’m planning for increasing how often search statuses are updated, but it’s not scheduled for until 2.2 (2.1.2 with some bugfixes will be coming out today, so just wanted to mention that that feature won’t be a part of it).

    What interests me, is the gateway timeout, this usually means there’s a proxy server in front, which would definitely affect things, so your server it self might allow for executing longer than the proxy, and thus it gets a “false” timeout. (would very likely be sorted out by the enhancements I’ve got planned above though! )

    Thread Starter pingram

    (@pingram3541)

    Thanks for the update. I started looking into mod_security as a suspect too.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘No results found!’ is closed to new replies.