Jump to content

Jquery Popup on 4.1.9 not working


Pegasus83
 Share

Recommended Posts

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

Edited by Pegasus83
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Schermata del 2016-03-26 19-18-09.png

After 10 seconds...

Schermata del 2016-03-26 19-18-30.png

On the left there is the code, which was working before upgrading to 4.1.9 from 4.1.8

(Old jqueries are excluded)

Link to comment
Share on other sites

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.

Edited by T. D. Perry
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

3 minutes ago, Tracy Perry said:

Worth a try... all it can do is not work. :p

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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]

}

 

Link to comment
Share on other sites

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.

Edited by T. D. Perry
Link to comment
Share on other sites

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...

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...