Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Pegasus83 Posted March 26, 2016 Posted March 26, 2016 Hi, on my Forum I have a jquery based popup, which notifies users about new posts on my website. After the last update (from 4.1.8 to 4.1.9) it does not work well anymore. It freezes my forum homepage for at least 10 seconds, then it shows up (it was showing up immediately before the upgrade) but I can't open the user's menu. Has something regarding jquery changed? Thanks Alex
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 just to give another hint, this happens only on home page...in the others popup opens correctly
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 23 minutes ago, Hulu said: Have you tried to clear your sites cache? yes, tried everything. The popup is inside a php file I include after my forum's header. If I open that php file directly, the popup works correctly. If I open the forum's home, there's a 10 seconds delay of 'freezing' after which it opens. If I open any other forum's page, it works. May it be something related with the sidebar, which is the one different thing between home and other pages?
Tracy Perry Posted March 26, 2016 Posted March 26, 2016 I haven't checked - but what version of jQuery is IPS now using - and what version is your popup using (I'm assuming it's making a specific call to a .js file)? I have seen mismatch issues similar to this before.
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 3 minutes ago, Tracy Perry said: I haven't checked - but what version of jQuery is IPS now using - and what version is your popup using (I'm assuming it's making a specific call to a .js file)? I have seen mismatch issues similar to this before. So, this is what happens when I load the home After 10 seconds... On the left there is the code, which was working before upgrading to 4.1.9 from 4.1.8 (Old jqueries are excluded)
Tracy Perry Posted March 26, 2016 Posted March 26, 2016 16 minutes ago, Pegasus83 said: (Old jqueries are excluded) If you are directly calling ANY jQuery in it, it may not match the one that is used by IPS itself in the new version. I'm not sure what the older version was using.. but it looks like the 4.1.9 is using /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery.min.map which is no where near the newer versions (1.11.3/2.1.4). I know that on another script, calling a different version of jquery caused issues on some sidebar add-ons.
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 5 minutes ago, Tracy Perry said: If you are directly calling ANY jQuery in it, it may not match the one that is used by IPS itself in the new version. I'm not sure what the older version was using.. but it looks like the 4.1.9 is using /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery.min.map which is no where near the newer versions (1.11.3/2.1.4). I know that on another script, calling a different version of jquery caused issues on some sidebar add-ons. So it may be that if I exclude my calls to jquery it works?
Tracy Perry Posted March 26, 2016 Posted March 26, 2016 Just now, Pegasus83 said: So it may be that if I exclude my calls to jquery it works? Worth a try... all it can do is not work.
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 3 minutes ago, Tracy Perry said: Worth a try... all it can do is not work. I tried: no freeze AND no popup, I only see its content above the block as on the first image attached before.. It needs a Jquery to be loaded, but it seems to ignore the IPS default.
Tracy Perry Posted March 26, 2016 Posted March 26, 2016 1 minute ago, Pegasus83 said: I tried: no freeze AND no popup, I only see its content above the block as on the first image attached before.. It needs a Jquery to be loaded, but it seems to ignore the IPS default. Try a direct path to the jQuery being used by IPS? Not really sure where they have it scattered at. I'm finding the minimized version (jquery.min.js) in admin/upgrade/js admin/install/js admin/convertutf8/js Odds are someone familiar with how they scatter their files will have to come in - I think the fact that each "application" can be stand alone presents an issue where they put it, but I'd think they could standardize on their JS being stored somewhere in the CORE aspect since I'd assume it's used throughout.
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 1 hour ago, Tracy Perry said: Try a direct path to the jQuery being used by IPS? Not really sure where they have it scattered at. I'm finding the minimized version (jquery.min.js) in admin/upgrade/js admin/install/js admin/convertutf8/js Odds are someone familiar with how they scatter their files will have to come in - I think the fact that each "application" can be stand alone presents an issue where they put it, but I'd think they could standardize on their JS being stored somewhere in the CORE aspect since I'd assume it's used throughout. IPS js are under /forum/public/js I don't know if a solution could be to put them into this folder and try a path to them. It seems to be definitely something related to the sidebar or a block inside it..
Pegasus83 Posted March 26, 2016 Author Posted March 26, 2016 At the moment I found a workaround: The popup shows up only in pages where url contains "topic" $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; if (strpos($url,'topic') !== false) { [code for javascript popup] }
Tracy Perry Posted March 27, 2016 Posted March 27, 2016 3 hours ago, Pegasus83 said: IPS js are under /forum/public/js Not sure... as that path does not exist on my IPS 4.1.9 install. The only place I could find many *.js files was under ./applications/core/interface and then in the /public folder (but I was under the assumption these get overwritten/renamed frequently). Glad you got a fix figured out.
Pegasus83 Posted March 27, 2016 Author Posted March 27, 2016 Just now, Tracy Perry said: Not sure... as that path does not exist on my IPS 4.1.9 install. The only place I could find many *.js files was under ./applications/core/interface. Glad you got a fix figured out. ops... Maybe mine is an old folder from V3...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.