You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#111759 MediaBox and Community Surveys

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by swissvlad on Monday, 05 September 2022 10:56 BST

swissvlad
Hi,

MediaBox works fine on my Joomla 4 site, but does not work when I try to display a modal in Community Surveys.

Would you have any idea what the issue might be?

Thanks a lot!

Ryan
Please post a link to an example on your site.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
Of course:
- Working: https://prehosp.online-studies.net/fr/epdes
- Not working: behind a password - can I send you the connection info using a private communication channel?

Ryan
- Not working: behind a password - can I send you the connection info using a private communication channel?


Please use this form -> https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
I've opened the link: https://prehosp.online-studies.net/fr/quest (public access).

It's on the second survey page, the penultimate question.

Thanks a lot!

Ryan
Each page of this form is loaded dynamically, and as Mediabox activates when the site page loads, any links added dynamically in content after page load are not activated. To use MediaBox in this instance, you will need to trigger it manually on the link using an onclick event, eg:

<a href="https://cpr.online-studies.net/images/cas.png" target="_blank" rel="noopener" class="jcepopup" onclick="jcepopup.open(this.href, 'Cliquez ici pour obtenir des informations complémentaires sur les formations de type CAS', {'width':'50%'});return false;">Cliquez ici pour obtenir des informations complémentaires sur les formations de type CAS</a>

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
Thank you so much! 😃

swissvlad
I've just tried to insert this code, but JCE reverts to the original one

<p><a href="https://cpr.online-studies.net/images/cas.png" target="_blank" rel="noopener" type="image/png" class="jcepopup" data-mediabox="1" data-mediabox-width="50%" data-mediabox-title="CAS" data-mediabox-caption="CAS">Cliquez ici pour obtenir des informations complémentaires sur les formations de type CAS</a></p>
Is there anything I can do to avoid this automatic change?

Ryan
Where are you adding the code? It should be added in the Code tab as HTML.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
Yes, I'm adding it in the code tab, but this tab seems to be automatically edited - I will send you admin access using your secure form momentarily.

Thank you so much for your help!

Ryan
Don't add the "jcepopup" class in the link code, eg:

<a href="https://cpr.online-studies.net/images/cas.png" target="_blank" rel="noopener"onclick="jcepopup.open(this.href, 'Cliquez ici pour obtenir des informations complémentaires sur les formations de type CAS', {'width':'50%'});return false;">Cliquez ici pour obtenir des informations complémentaires sur les formations de type CAS</a>

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
Hi,

Thanks for your help!

I apologize, but it still doesn't work, and the plugin automatically adds the "jcepopup" class - is there a way to disable this?

Otherwise, I've sent you temp super user info using your secure form.

My apologies for this recurring problem.

Ryan
Otherwise, I've sent you temp super user info using your secure form.


I need some guidance here as to where to look for the code you have added.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
Of course!

Once logged in, go to: https://prehosp.online-studies.net/administrator/index.php?option=com_communitysurveys&view=survey&layout=questions&id=1

Then select page 2 (Page: Formation (ID: 2))

The code was entered in the penultimate question (ID 27 - "Une formation de type CAS vous semblerait-elle appropriée pour une formation avancée en soins préhospitaliers d'urgence?")

Thank you so much!

PS: if you'd rather, I can create a dummy questionnaire to help debug.

Ryan
There appears to be an issue with editing here. This survery https://prehosp.online-studies.net/administrator/index.php?option=com_communitysurveys&view=survey&layout=questions&id=1 does not appear to be the same as this one - https://prehosp.online-studies.net/fr/quest

If I edit the survery, removing the link completely, it is still displayed here - https://prehosp.online-studies.net/fr/quest

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
I will look into this issue. Thanks!

Ryan
There doesn't appear to be a way to save changes to a survery. If I make a change, and click Publish Survey, the changes are not saved. This is the issue.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

swissvlad
OK, I'll see with the survey component developer - thanks!