Close

Avoid code stripping in Joomla 1.7

joomlaOn a recent client’s site I had to create a form in a module position to allow users to book a room. Everything looked fine and dandy in the backend, however, when the user clicked on the submit button on the frontend the page just refreshed. On further analysis it turned out that Joomla (1.7.2) was stripping the action tag from the form.

OK, have come across this in Joomla 1.5 (and 1.0) a number of times so I went into the JCE administrator and turned off all code cleanup and tried again. That’s odd, it happened again. What’s going on? hmm, I wonder if this is a problem with the new JCE (unlikely methinks) or if it’s some quirk of Joomla 1.6 and Joomla 1.7.

OK, no try it in plain text view. Same problem!

OK, so now to I turned off the editor in the Global Configuration – I really thought that this would work as I’m just editing plain text now, but it didn’t. Hmm, something quite different in Joomla 1.6 and Joomla 1.7 then. On further research this behaviour was occurring due to Joomla‘s new text filtering functionality.

Solution: Even though this is a module the content editing is controlled by the Article Manager options. To fix

  1. Go to Article Manager
  2. Options
  3. Text Filtering
  4. Select the group Super Users
  5. Select No Filtering
  6. Save

Once I went back to the module manager the code was being saved correctly.

I can’t understand why the system would be set to strip these kind of tags out by default, but at least I have a workaround now.

UPDATE: Joomla 2.5 has been  released. In this version the team have moved the Text Filtering option into the Global Configuration section.

QED

8 thoughts on “Avoid code stripping in Joomla 1.7

  1. This was driving me crazy as well. I checked several websites until I finally realized what the real problem was which you described perfectly. Fortunately, unlike Joomla’s forum, you had the right solution. I had changed the editors, changed attributes to the editors to no avail. One thing, I had changed the allowed elements and attributes for TinyMCE and it was still doing crazy stuff. When I took them out, everything went back to normal. Also, don’t forget to log out and back in when doing this change. Apparently although the settings are set, since the action is happening on the database, the old filters appear to still be running.

    Thanks again!

    1. Hi Iain, thanks for taking the time to reply. Yeah, that caught me out for a while before I found a solution. Also remember that the location of the text filtering is under Global Configuration on the new Joomla (2.5+).
      Trev

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.