The Joomla! Forum ™



Forum rules


Please use the Forum Post Assistant to give your server setting details which are necessary to determine the problem.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
PostPosted: Fri Oct 29, 2010 7:28 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 07, 2009 5:28 am
Posts: 10
I am unable to insert PHP and JavaScript code in Joomla 1.6 articles. The code gets stripped upon saving even I set the TinyMCE settings in the Plug-in Manager as follows:

Cleanup code on load: Off
Clean code on Save: Never
I've also removed javascript, iframe from Prohibited Elements.

With the above settings, I am still unable to insert PHP and/or JavaScript code in articles. Is there a way to do this in Joomla 1.6?


Top
 Profile  
 
PostPosted: Fri Jan 21, 2011 6:34 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jan 21, 2011 6:27 pm
Posts: 3
The quickest and easiest route to including code in content is to have a spare user account set up without any editor, and include that user in a group for which there are no blacklisted tags.

You set blacklist/whitelist tags in:

Article Manager --> Options --> Set Filter Groups to No Filtering for the access level of your spare user. (Best to use a Super User account for this if you can.)

John Hobart


Top
 Profile  
 
PostPosted: Mon Jan 24, 2011 4:41 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jan 24, 2011 4:32 pm
Posts: 2
Hi,

I have exactly the same problem with joomla 1.6, i tryed all possible options (no filter with superuser, administrator ... ) this and the editors still delete java and <embed>..
editors : none, tinyMCE, artof ..

i'm the superuser and it is the default superuser account, unregistred. Do i have to registre it ?

i want to put a flv or mp4 video into an article, i try to use the JWPLAYER, and i can't put a embed or java code, all editors always delete the code as soon as i save it :-\ .

Someone have an idea ?

(sorry for my bad english)

thx


Top
 Profile  
 
PostPosted: Mon Jan 24, 2011 4:53 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jan 21, 2011 6:27 pm
Posts: 3
Article Manager --> Options --> Set Filter Groups

You need to set the filter groups. See my earlier post.


Top
 Profile  
 
PostPosted: Mon Jan 24, 2011 10:15 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jan 24, 2011 4:32 pm
Posts: 2
Hello Jhobart,
i understood your earlier post and already done. There isn't an 'option' buttom with 1.6, there is parameters -> filter groups, and i'd put administrator and super user to "no filter".

the same for TinyMCE settings in the Plug-in Manager:

Cleanup code on load: Off
Clean code on Save: Never

And nothing change (of course i always saved when i change option !).

when i use "no editor" or artof, embed or java disapear whan i save.

Is there a cache system somewhere ? Cache is diseable into the configuration panel (off)

this thing [drive] me crazy !

thx


Top
 Profile  
 
PostPosted: Mon Jan 24, 2011 10:31 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jan 21, 2011 6:27 pm
Posts: 3
Hey Mr. 13,

Can you paste the code you're trying to insert here? If that's not an option, you can send it to me at jhobart at synergycode dot com.

Thanks,
John


Top
 Profile  
 
PostPosted: Mon Jan 31, 2011 12:02 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jan 30, 2011 11:55 pm
Posts: 2
I am having the same problem. Settings for TinyMCE are Cleanup code on load: Off
Clean code on Save: Never HTML:raw and all filters set to raw. Javascript is stripped no matter how I add it. This is the code I have been using for testing:-
Code:
<p>Some text
  <span onclick="alert('hello world');">
    click me</span></p>

<p>This is how we add a
  <a href="javascript:alert('hello world');">
    game</a></p>

<p>Some more text</p>

<script>
alert('hello world');
</script>

<p>Some more text</p>


And the result is always the same:-
Code:
<p>Some text
  <span>
    click me</span></p>


<p>This is how we add a
  <a>
    game</a></p>


<p>Some more text</p>


<p>Some more text</p>


Top
 Profile  
 
PostPosted: Mon Jan 31, 2011 12:32 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jan 30, 2011 11:55 pm
Posts: 2
oops, my bad. The <script> tag is only stripped when saving without the TinyMCE editor (ie Global Config is set to use no editor).


Top
 Profile  
 
PostPosted: Mon Feb 07, 2011 4:43 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 07, 2011 3:58 pm
Posts: 2
I'm having the same issue with 1.6, trying to insert this code into an article. My code either simply appears as text, or nothing shows up at all for the article (either in the editor or on the webpage itself). I'm a total newbie here, so I'm just hoping/thinking that this is all due to my own ignorance.

I've configured tinyMCE with clean code on load=off, clean code on save=never, entity coding= raw, and I've removed all prohibited elements from the prohibited elements field (although they reappear after saving?). I've also tried setting the editor to none, and codemirror, but no luck.

I've configured the article manager settings to have no filtering for any groups (just to test). No luck.

Here' what I'm trying to paste into an article (I've tried just pasting it into the article, and pasting it in via the HTML editor link, but no change in result):

<link type="text/css" rel="stylesheet" href="/script/css/calendar.css" />
<link type="text/css" rel="stylesheet" href="/script/ajax.php?controller=calendars&action=css&cid=1" />
<script type="text/javascript" src="/script/js/custom.js"></script>
<script type="text/javascript" src="/script/js/front.js"></script>
<script type="text/javascript" src="/script/load.php?cid=1&view=3"></script>

Anything else that I should be doing? Maybe something I'm supposed to be inserting into the code besides what's shown above? The "script" directory referenced above is in the root directory where the joomla site files are installed.

Thanks in advance for the use of your brains.

Ted


Top
 Profile  
 
PostPosted: Wed Feb 09, 2011 7:46 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 02, 2009 11:08 am
Posts: 10
I agree with the previous writers: Setting the article filter groups (to "no filter") doesn't work!
Bug altert?
Example:

<p>
<script src="http://lite.piclens.com/current/piclens.js" type="text/javascript"></script>
<ul class="p2">
<li> <a href="javascript:PicLensLite.start({feedUrl:'/galerij/Bonaire.rss'});" target="_parent"> Bonaire 2008 </a> </li>
</ul>
</p>

changes to:
<p> </p>
<ul class="p2">
<li> <a target="_parent"> Bonaire 2008 </a> </li>
</ul>
<p> </p>

With all the filters set to "no filter".


Top
 Profile  
 
PostPosted: Wed Feb 09, 2011 8:44 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 07, 2011 3:58 pm
Posts: 2
Looks like someone's looking into this bug for 1.6 (opened on Jan 22, 2011):

http://joomlacode.org/gf/project/joomla ... m_id=24545


Top
 Profile  
 
PostPosted: Sun Feb 13, 2011 2:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Mar 07, 2009 1:18 pm
Posts: 39
The patch at the bottom of the page on Tedly's link worked for my Joomla 1.6 installation.
<-- --> tags are no longer removed.
It doesn't strip my php tags either.
I'm using no editor and have given my user account no filter settings.
Simply awesome!!!! :D


Top
 Profile  
 
PostPosted: Fri Apr 22, 2011 9:23 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 22, 2011 9:16 pm
Posts: 14
Location: Paris (France)
Hello
Maybe it's possible to use the plugin 'jumi' (http://edo.webmaster.am/jumi)

_________________
Le peu que je sais est occulté par le trop que je ne sais pas...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group