Store Locator Plus® for WordPress Forums Store Locator Plus Store Locator Plus Conflict With Pretty Photo

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

    Hello,

    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;”>http://store2.soobahkdo.org/wp-content/themes/magnium/js/template.js?ver=dc067e86be26330658bfc705d60572aa 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 6 years, 1 month ago by Cici.
    #38550
    Cici
    Keymaster

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

    #38555
    Lance Cleveland
    Keymaster

    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)
  • The topic ‘Store Locator Plus Conflict With Pretty Photo’ is closed to new replies.