Search
Other Modals questions
Forum

unwanted opening modals on J4 start-page (modals J4)

Dirk67's Avatar Dirk67
sometimes if I clear the cache in the backend (RL cache-cleaner)
and then open the homepage of the J4 site
several (2 or 3) modals are popped up and overlay each other,
I have to close all modals (one after another) to see the homepage content again.

see this screen video:
Confidential information:
(hidden)


I have this seen very often when we were evaluating all the modals J4 beta versions the last days,
I didn't pay much attention, I thought this happens when I "overinstall" the modals extension with a newer version..

But now I installed a different extension (not from JL), and after the istallation is finished RL cache-cleaner does its job and cleans the cache,
and voilà: the same issue again on the homepage (see video)

To be honest I can not reproduce it,
I think that it occurs often after installing an extension,
but I can not verify or reproduce it.
(I am even not sure that it has to do with RL cache cleaner at all)
Peter van Westen's Avatar Peter van Westen ADMIN
I too cannot reproduce the issue on your site. All seems fine after clearing the cache.
So no idea what would cause that.
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
I think (do not know) the problem remains as long as the joomla cache time lasts (now: 15min / conventional cache),
so I will increase the cache time to 2 hours or so,
and try to trigger the error again,
so maybe you can see it "live" and not from the video only ....
Peter van Westen's Avatar Peter van Westen ADMIN
I could see the popups open.
It seems all modal links get the open="true" attribute. But not sure why.
When trying to do some output debugging, I can of course no longer trigger the error.

I cleared cache and re-installed the Regular Labs Extension Manager... but that doesn't seem to retrigger the issue.
What steps did you take to retrigger it?
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
I could see the popups open.
really ?
I didn't do anything in the meantime 😉
I was neither in the frontend nor in the backend the last hour ...


What if all modal links are (for whatever reasons) written with the open="true" attribute into the cache ?
would that explain it ?
Peter van Westen's Avatar Peter van Westen ADMIN
What if all modal links are (for whatever reasons) written with the open="true" attribute into the cache ?
That could explain it. But it would not explain why that would happen.

Also, it looks like the cache does not contain the {modal} tags. But the final <a> tags.
So I am not sure how and why Modals generates all links with the open="true" thing.
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
yes you are right ...

...very strange
Peter van Westen's Avatar Peter van Westen ADMIN
I placed some debugging output to see where the 'open' thing gets a true value. But I have not been able to reproduce the issue anymore. So not sure how I can debug this...
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
5 month later:
unfortunately this is still an issue to me ...
I am in a big update from J3 to j4, everything works fine so far,
I solved every problems / workarounds,
but this is the last remaining error (that prevents me from going live)
and I have no idea what to do...

During the whole migration phase (3 weeks), with all the template work and all the extensions uninstall and reinstall / upgrade again,
and always celaning the cache etc... ,
I have surely faced this error more than 10 times (!)

Today in the morning I finally wanted to go live,
but on the first visit of the start page I saw this error again:
all modals from that page pops up (by themselves) at the same time
The problem remains until the joomla cache time is over, or until I trigger the cache cleaner in the backend..
(the page is not usable for a visitor during that time)

you once saw that error by yourself
I could see the popups open.
It seems all modal links get the open="true" attribute. But not sure why.
so you know what I am describing here,
but I am still not able to trigger that faulty behavior.
Peter van Westen's Avatar Peter van Westen ADMIN
It is pretty much impossible to debug something that is not reproducible.
Also, I have not had any other reports about this behavior. So I guess it is due to some combination of extensions or something.
Not sure what I can do for you...
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
what would you do in my place now ?

So I guess it is due to some combination of extensions or something
5 month ago I demonstated the error on a completely "vanilla" J4 installation (maybe you remember?)
(no template and the only (non-core) extensions were cachecleaner and modals)
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure. What would you do in my place now?
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
Since we both obviously do not know what to do,
I implemented a "brute force" method now:
since the rereplacer plugin is placed in execution order after the modals plugin,
I implemeted a rule in rereplacer to delete unwanted
data-modals-open="true"
-tags within the generated html..

in my case:
• data-modals-open="true" -tags are unwanted on modals with images,
• data-modals-open="true" -tags are wanted on content Modals

so the rereplacer rule is quite simple:
find:
(data-modals-type=\"image\" )(.*?)(data-modals-open=\"true\" )
replace with:
$1$2

this rereplacer rule fires only if the modals plugin unintentionally* generates a data-modals-open="true" -tag on a modal image.
*(without having set the open="true" parameter within the {modal} tag of an image in the article editor (what I never did))

I think we really don't know if the reason for this error is
that the modals plugin unintentionally* creates a data-modals-open="true" tag in the generated html-output,
but if the error does not appear from now on, there is a chance.
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, hope this fixes things for you...
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription