Store Locator Plus Conflict With Pretty Photo

Home Forums Store Locator Plus Store Locator Plus Conflict With Pretty Photo

This topic contains 2 replies, has 3 voices, and was last updated by  Lance Cleveland 9 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #38511



    On one of our sites running WP 4.4.2 multisite network,  DEACTIVATING the plugin Pretty Photo v1.2 completely breaks Store Locator display.

    YEP, I said DEACTIVATING.  As long as PrettyPhoto is active, then Store Locator behaves as expected. PrettyPhoto came bundled with Magnium Theme in use on this site.

    The WordPress port of the jQuery library named PrettyPhoto. Version 1.2 | By Babar |
    Copy of plugin attached

    I also duplicated this issue on a 2nd site.

    Deactivating Pretty Photo also results in broken features on the theme Magnium, but they do list it as a required plugin, so that’s not really an issue, but why would deactivating it impact Store Locator?

    When Pretty Photo is deactivated Debug Bar Reports this error, but nothing about Store Locator:

    Uncaught TypeError: $(…).prettyPhoto is not a function</span><span style=”box-sizing: border-box; color: #000000; font-size: 0.8em; display: block; font-family: Monaco, ‘Courier New’, Courier, Fixed; line-height: 21.6px;”> line 307

    Seems that something may be overlapping or stepping on each other for Store Locator Plus to be affected.

    The issue is resolved as long as we leave Pretty Photo activated.

    Just thought you should be aware in case this indicates some kind of code issue warranting attention.

    • This topic was modified 9 months, 3 weeks ago by  SooBahkDo.
    • This topic was modified 9 months, 3 weeks ago by  SooBahkDo.
    You must be logged in to view attached files.


    Hmm that is odd. I think I will let the developer look into this one.


    Lance Cleveland

    Mostly likely the theme is mangling the built-in WordPress jQuery that ships with WordPress core.    Very likely forcing a specific release of jQuery and running in conflict mode ($ shorthands in jQuery) vs. the WordPress-suggested no conflicts mode (always using long-form jQuery instead).     None of these things are good and do not follow WordPress best practices.    Having ad-hoc versions of jQuery running in an interdependent application framework like WordPress is not a good idea.

    If I had to venture I guess I would be that somewhere buried deep in that theme, is a piece of code logic that is short-circuiting and loading the older-incorrect jQuery and/or conflicts (shorthand) mode whenever Pretty Photo is not in place.

    Of course this is all just conjecture, but we run SLP on many of our own sites as well as multisite installs and there are 18,000 other sites running it today with an estimated 500+ on multisite.      I’ve not seen any other reports of conflicts with a JavaScript-centric image library including PrettyPhoto.

    If you can get me access to a site I can look at from here & possibly log into with admin and play with (activate/deactivate stuff) I can look more closely.   However very single time I’ve seen a $() reference on jQuery in an error or log it is exactly as prescribed above.    In short, bad themes/plugins not following WP best practices.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.