• I read a topic about a similar error, which was marked “resolved.” Well, I’m having pretty much the same error but under different conditions. The previous post maintained this was an error when using the Easy Bootstrap Shortcode Pro plugin. I’m not using that plugin; and I followed the advice of disabling shortcode expansion. Still, I get this warning, but ONLY when you search for a term that isn’t found:

    Undefined property: WP_Query::$post in <b>/mnt/stor2-wc1-dfw1/372872/[ domain name ]/web/content/[ theme name ]/wp-includes/query.php</b> on line <b>3946</b>

    https://www.ads-software.com/plugins/relevanssi/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mikko Saari

    (@msaari)

    I’d check your theme search results template; perhaps it’s missing the check to see if any results are found. I assume that if your search results template tries to loop through the results when there are no results available, something like this should come up.

    This has nothing to do with shortcodes, that much I can tell you.

    Thread Starter Who_Dat

    (@who_dat)

    I changed the theme to TwentyFourteen, to TwentyThirteen, and to TwentyTwelve, and got the same results with each of them, so it’s nothing in the theme.

    Plus, I have an older development site that is still running on 4.0.1, with virtually the same search.php and searchresults.php (the only differences are the HTML output), and it works fine.

    Plugin Author Mikko Saari

    (@msaari)

    If it’s not the theme, then I’d go through plugins – is a plugin perhaps causing a conflict with Relevanssi?

    Thread Starter Who_Dat

    (@who_dat)

    Yes. Turns out the problem is Easy Modal 2.0.16. I deactivated that, and the error disappears.

    Problem is: for this site, the modal windows are actually a more important element than the search. Do you know of any solution to this kind of conflict that doesn’t simply involve dumping one of the plug-ins?

    @who_dat – Chiming in here since I’m the author behind Easy Modal. The only thing we do is add db tables to $wpdb, we don’t use nor modify anything to do with the WP_Query class at all. That said, the modals are not even a CPT and would not show up or affect the search results at all in that since. We use custom queries to get everything currently.

    Maybe install query monitor plugin to see exactly what kind of query is happening to break things.

    That said if it only occurs with no results, what functionality is currently in place in Relevanssi to handle empty results, that is where I would start.

    PS have used Relevanssi before with Easy Modal sites and never seen this problem, just tried it on one of them now that uses it and couldn’t reproduce the problem even with WP_DEBUG on.

    On another note, have you tried upgrading to Popup Maker. Has built in import tools for Easy Modal users.

    @who_dat, does your older dev site with WP 4.0.1 use Easy Modal as well without the issue? If so I would say that rules out Easy Modal in general, and makes it sound more like changes to the core that are causing it.

    Not trying to say there can’t be a problem with Easy Modal, just pointing out that its not a constantly reproduceable error which means it is unlikely that Easy Modal is the direct cause alone.

    Thread Starter Who_Dat

    (@who_dat)

    I installed Query Monitor, and can’t figure out what it does.

    I also installed Popup Maker, and on installation I got this:

    Notice: Undefined index: weight in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 79
    
    Notice: Undefined index: style in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 80
    
    Notice: Undefined index: weight in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 89
    
    Notice: Undefined index: style in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 90
    
    Notice: Undefined index: weight in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 102
    
    Notice: Undefined index: style in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/importer/easy-modal-v2.php on line 103

    I went ahead and tried the plugin anyway; imported the Easy Modals using the import tool; then changed the class name of one of them from “eModal-9” to “popmake-120” — which was, I assumed, all that needed to be done. Anyway, it didn’t work: that particular link wouldn’t launch a modal. All the Easy Modals still worked. What’s more, clicking on any page now shows this error:

    Notice: Undefined index: items in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/google-fonts.php on line 26
    
    Notice: Undefined index: items in /mnt/stor2-wc1-dfw1/372872/www.[ domain name ].com/web/content/ [ folder name ] /wp-content/plugins/popup-maker/includes/google-fonts.php on line 26

    @who_dat, You don’t need to change the eModal classes right away or at all if you don’t want. This will make switching easier if you decide to go back. There is an option in Popup Maker -> Settings -> Misc Tab that will automatically forward those classes to the proper popups.

    Did your theme and modals appear to import properly despite the errors? I will look into those and see if there is a problem I can address for that in the future.

    If they are in the popup list and the theme looks correct do you have a link I can look at to see what may be happening?

    Thread Starter Who_Dat

    (@who_dat)

    I think we probably should take this part of the discussion over to the Popup Maker support board. So, without further ado…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘"Undefined property: WP_Query" whenever search term not found’ is closed to new replies.