• Resolved digitaltransformation

    (@digitaltransformation)


    A developer created a custom plugin that produces a hardcoded page with a page title. I search for the title but the results turned up empty. is there something I can do to expand the search areas, or does it already look at plugins?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Marius L. J.

    (@clorith)

    Hi,

    It depends on what option you chose for it to search through, the default option is for it to search in every single file in every plugin, theme and WordPress it self.

    Could you share what text you were searching for, as I had two reports of it not finding some things being searched for, and was meant to look more into that last week, but alas time got away from me, so having another string ot test against would probably help.

    Thread Starter digitaltransformation

    (@digitaltransformation)

    Hi Markus,

    I was searching for “Unique gift items for kids and teens!” and then “Unique” on https://www.kidtivity.com/marketplace/ it’s a hardcoded subtitle.

    Does it really search thru everything? I found it after downloading the site back-up in the titles.php file. The folder structure is: wp-content>themes>theme-name>lib>titles.php

    It did find the file when I searched for titles. So that’s good!

    File:
    Namespace Roots\Sage\Titles;

    /**
    * Page titles
    */
    function title() {
    if (is_home()) {
    if (get_option(‘page_for_posts’, true)) {
    return get_the_title(get_option(‘page_for_posts’, true));
    } else {
    return __(‘Latest Posts’, ‘sage’);
    }
    } elseif (is_post_type_archive(‘marketplace’)) {
    return “Kidtivity Marketplace <small>Unique gift items for kids and teens!</small>”;
    } elseif (is_post_type_archive(‘tribe_events’)) {
    return “All Kid and Teen Events in CT”;
    } elseif (is_archive()) {
    return get_the_archive_title();
    } elseif (is_search()) {
    return sprintf(__(‘Search Results for %s’, ‘sage’), get_search_query());
    } elseif (is_404()) {
    return __(‘No Results Found, Please Try a Different Search’, ‘sage’);
    } else {
    return get_the_title();
    }
    }

    Have been using your plugin for what seems like a long time. Have enjoyed the invaluable help it provides. I now can’t get it to find anything inside files. It will find text strings in the files name, but no words (text strings) in files.

    I am up on WP 4.7.2, on all sites, and have version 2.1.0 of the plugin installed.

    Have tested it searching the String Locator plugin directory, with and w/o regex checked.
    While testing and trying to find some kind of pattern, have used string like ajax and function as search string. No luck. Also, have disabled other plugins and switched themes to 2017. Still no joy.

    Is it possible that WP 4.7.2 is conflicting?

    Plugin Author Marius L. J.

    (@clorith)

    Great news, I’ve found the cause of the searches not working as they should (regex searches -do- work though, but require you to write a proper regex string, I may improve on that along with the fix).

    It seems it’s not properly identifying if you are doing a regex or plain text search in all cases, and as such just errors out and finds nothing. I’ll have this sorted hopefully by the end of the day today with a patch up, but at the latest by the end of the weekend.

    Thank you very much for the reports and strings to help me search and track it down with!

    Plugin Author Marius L. J.

    (@clorith)

    Hi,

    Just wanted to reach out and let you both know that version 2.1.1 is up now which has a fix for the search strings not always being found (as well as some other fixes that were discovered along the way).

    Please do let me know if you encounter any other issues!

    Updated String Locator on all of my sites and tested. The correction worked and am again able to find things in the various file types that can be searched.

    Great job; appreciative of the quick response and quality work that you do.

    Here comes the “can’t stand prosperity” part:
    I would like to expand the search capability to include other directories ‘close’ (located in the same domain file system) to the WordPress directories. I keep software for web apps in the same domain directory as the 3 WP directories. It would be very helpful if the drop down select for where to search could include user supplied directory(s) for the search.

    Again, thanks!

    Plugin Author Marius L. J.

    (@clorith)

    I’m afraid searching non-WordPress locations is a bit out of scope for this plugin, and is a rabbit hole I’d rather not venture into ??

    Thread Starter digitaltransformation

    (@digitaltransformation)

    Reposting reply as I put it in another thread.

    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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Is it possible that the tool is not looking at all files?’ is closed to new replies.