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
- Forum
- JCE Editor
- How to insert iFrame to display only the main article content on different site?
Support is currently Offline
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Please post your question in the Forum and we will get back to you as soon as we can.
Hi Ryan,
I have Joomla 3.7.5 and JCE. Is there a way to insert an iFrame or some method to display the main article content (not the whole page with headers/footers/menus/modules) into an article another one of my sites?
For example, I have articles that I want to display in the article content area of pages on two of my Joomla sites. I can't just copy and paste the articles into both sites because the source article will be updated on a continual basis. So I'm trying to find a way to not have to edit/update the articles on both sites manually. I can't find the correct code to do this. Or is this not possible without having the full page inserted as an iFrame.
Thanks.
I have Joomla 3.7.5 and JCE. Is there a way to insert an iFrame or some method to display the main article content (not the whole page with headers/footers/menus/modules) into an article another one of my sites?
For example, I have articles that I want to display in the article content area of pages on two of my Joomla sites. I can't just copy and paste the articles into both sites because the source article will be updated on a continual basis. So I'm trying to find a way to not have to edit/update the articles on both sites manually. I can't find the correct code to do this. Or is this not possible without having the full page inserted as an iFrame.
Thanks.
To display a Joomla article without the surrounding modules, add &tmpl=component to the URL, (use ?tmpl=component if the URL does not already contain a ? character) eg:
https://www.joomlacontenteditor.net/support/documentation/68-iframes/725-creating-an-editing-iframes?tmpl=component
https://www.joomlacontenteditor.net/support/documentation/68-iframes/725-creating-an-editing-iframes?tmpl=component
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Hi Ryan,
I cannot get the iFrame button, along with some other buttons, to display in my article editor screen. I have my SuperUser JCE Profile saved with almost all the JCE editor icons/buttons added to the toolbar. But when I open an article to edit, those extra rows of buttons don't appear.
Is there a limit to the number of editor buttons, or the number of rows that can display in the Joomla article editor?
Screenshots:
https://drive.google.com/file/d/0BwXZzY2mIiORakxSTDV1MmZfWms/view?usp=sharing
https://drive.google.com/file/d/0BwXZzY2mIiORZ0R6cGZncnJGLTA/view?usp=sharing
I cannot get the iFrame button, along with some other buttons, to display in my article editor screen. I have my SuperUser JCE Profile saved with almost all the JCE editor icons/buttons added to the toolbar. But when I open an article to edit, those extra rows of buttons don't appear.
Is there a limit to the number of editor buttons, or the number of rows that can display in the Joomla article editor?
Screenshots:
https://drive.google.com/file/d/0BwXZzY2mIiORakxSTDV1MmZfWms/view?usp=sharing
https://drive.google.com/file/d/0BwXZzY2mIiORZ0R6cGZncnJGLTA/view?usp=sharing
Yes, I have about 6 profiles enabled. But I am logged into the site only with the SU profile.
Why would it matter if I have multiple JCE profiles setup?
Screenshot: https://drive.google.com/file/d/0BwXZzY2mIiORWFVMR2JOOVBwRnc/view?usp=sharing
Why would it matter if I have multiple JCE profiles setup?
Screenshot: https://drive.google.com/file/d/0BwXZzY2mIiORWFVMR2JOOVBwRnc/view?usp=sharing
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Hi Ryan,
Okay, does that mean that JCE Profiles have to have a saved order from most permissions descending down to least permission user groups?
If yes, then on all of my sites I need to reverse the order of the JCE profiles.
On all my sites I have the JCE Profiles for the lowest permission user groups listed at the top, and in descending order it goes down to the SuperUser group profile. Should I reverse this order on all my sites?
Okay, does that mean that JCE Profiles have to have a saved order from most permissions descending down to least permission user groups?
If yes, then on all of my sites I need to reverse the order of the JCE profiles.
On all my sites I have the JCE Profiles for the lowest permission user groups listed at the top, and in descending order it goes down to the SuperUser group profile. Should I reverse this order on all my sites?
Profiles are evaluated from the top down, with the first profile to match the environment being the one that is used.
In your situation, the Super User group is a child of one of the admin groups assigned to the Content Admins Profile, so the match was made and that profile was used.
In your situation, the Super User group is a child of one of the admin groups assigned to the Content Admins Profile, so the match was made and that profile was used.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Hi Ryan,
I tested out the JCE iframe insert feature but it's not displaying the iframe content on the frontend. I get the following error message when I use the Preview while in the article editor screen.
https://drive.google.com/file/d/0BwXZzY2mIiORNGVyU01vSWV5ZFk/view?usp=sharing
Does Chrome block iframe content? The iframe inserted has an SSL so the URL has https in it, maybe that is a problem?
Thanks.
I tested out the JCE iframe insert feature but it's not displaying the iframe content on the frontend. I get the following error message when I use the Preview while in the article editor screen.
https://drive.google.com/file/d/0BwXZzY2mIiORNGVyU01vSWV5ZFk/view?usp=sharing
Does Chrome block iframe content? The iframe inserted has an SSL so the URL has https in it, maybe that is a problem?
Thanks.
Here is one example URL, if you need more then you can take any of the articles in the library of articles to test with.
https://www.nemmar.org/more/150-featured-articles/16891-video-man-rescues-dogs-from-torture-and-slaughter-in-asia
I've tested the iframes using text articles and video articles and they all have the same problem. I also tested using URLs/pages from my other domain sites so it's not an issue with this one domain. Maybe it's a Google Chrome security setting, or maybe it's a Joomla or server security setting. I use Admin Tools and I have a dedicated server but I don't think those security settings would block the iframes.
Thanks.
https://www.nemmar.org/more/150-featured-articles/16891-video-man-rescues-dogs-from-torture-and-slaughter-in-asia
I've tested the iframes using text articles and video articles and they all have the same problem. I also tested using URLs/pages from my other domain sites so it's not an issue with this one domain. Maybe it's a Google Chrome security setting, or maybe it's a Joomla or server security setting. I use Admin Tools and I have a dedicated server but I don't think those security settings would block the iframes.
Thanks.
I thought you just wanted a URL to test in an iframe on your own test site.
Here's a URL on my sites with the iframe code that does not display:
https://www.nde.life/library/life-death-god-and-heaven/16869-guy-cozzi-recommendations
The other URL is a page on my site with a URL that you can test on your own site for an iframe:
https://www.nemmar.org/more/150-featured-articles/16891-video-man-rescues-dogs-from-torture-and-slaughter-in-asia
Here's a URL on my sites with the iframe code that does not display:
https://www.nde.life/library/life-death-god-and-heaven/16869-guy-cozzi-recommendations
The other URL is a page on my site with a URL that you can test on your own site for an iframe:
https://www.nemmar.org/more/150-featured-articles/16891-video-man-rescues-dogs-from-torture-and-slaughter-in-asia
The browser is blocking the loading of the URL, because a script on the target site is attempting to access content outside of the iframe, which the default security options of the iframe do not allow.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
You can set a sandbox attribute on the iframe to allow scripts, but this is not a great idea for external sites, eg:
See - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
<iframe src="/https://www.google.com" sandbox="allow-scripts"></iframe>
See - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
Just because you're not paranoid doesn't mean everybody isn't out to get you.
I tested without the ads on the page and the iframe didn't work.
I will test out the sandbox="allow-scripts" attribute. Is that a setting in the JCE iframe insert window? Or do I need to manually add that code in the Code View?
Why do you say it's not a great idea for external sites? Is it a security risk or a potential performance/display issue?
If the only external sites used for my iframe URLs are my own sites/domains, then would that still be a security risk or performance problem?
What I want to accomplish is: I have articles that I want to display in the article content area of pages on two of my Joomla sites. I can't just copy and paste the articles into both sites because the source article will be updated on a continual basis. So I'm trying to find a way to not have to edit/update the articles on both sites manually.
I will test out the sandbox="allow-scripts" attribute. Is that a setting in the JCE iframe insert window? Or do I need to manually add that code in the Code View?
Why do you say it's not a great idea for external sites? Is it a security risk or a potential performance/display issue?
If the only external sites used for my iframe URLs are my own sites/domains, then would that still be a security risk or performance problem?
What I want to accomplish is: I have articles that I want to display in the article content area of pages on two of my Joomla sites. I can't just copy and paste the articles into both sites because the source article will be updated on a continual basis. So I'm trying to find a way to not have to edit/update the articles on both sites manually.
Why do you say it's not a great idea for external sites? Is it a security risk or a potential performance/display issue?
Please see - https://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/
I will test out the sandbox="allow-scripts" attribute. Is that a setting in the JCE iframe insert window? Or do I need to manually add that code in the Code View?
You will need to add this in the code view. You might need to try
sandbox="allow-same-origin allow-scripts"
Just because you're not paranoid doesn't mean everybody isn't out to get you.
I tested out both sandbox attributes and it's still not working. The iframes don't display.
sandbox="allow-scripts"
sandbox="allow-same-origin allow-scripts"
If the iframes work for other JCE customers, then it must be something on my site that's blocking it.
Does that mean that the content/scripts on the inserted iframe content has other security blocks? Or would it be some other settings in Joomla or browsers?
sandbox="allow-scripts"
sandbox="allow-same-origin allow-scripts"
If the iframes work for other JCE customers, then it must be something on my site that's blocking it.
Does that mean that the content/scripts on the inserted iframe content has other security blocks? Or would it be some other settings in Joomla or browsers?
If the sandbox options don't fix it, then something on the target site is causing the iframe to be blocked by the browser. This is the reason for the "because it set 'X-Frame-Options' to 'sameorigin'." error in the image I posted above.
The answer for this StackOverflow question explains the error message - https://stackoverflow.com/questions/45099755/error-in-a-frame-because-it-set-x-frame-options-to-sameorigin
The answer for this StackOverflow question explains the error message - https://stackoverflow.com/questions/45099755/error-in-a-frame-because-it-set-x-frame-options-to-sameorigin
Just because you're not paranoid doesn't mean everybody isn't out to get you.
I found the answer... Admin Tools has a clickjacking block for their htaccess file.
Some of your other customers might have the same issue and need to disable this for iframes if they use Admin Tools.
Search for "iframe" on the Akeeba help page at:
https://www.akeebabackup.com/documentation/admin-tools/htaccess-maker.html
For the next JCE update, can you consider adding the "sandbox" attributes as setting options in the JCE editor iframe insert screen?
Some of your other customers might have the same issue and need to disable this for iframes if they use Admin Tools.
Search for "iframe" on the Akeeba help page at:
https://www.akeebabackup.com/documentation/admin-tools/htaccess-maker.html
For the next JCE update, can you consider adding the "sandbox" attributes as setting options in the JCE editor iframe insert screen?
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!