Question

I have developed a front-end system plugin for Joomla 3.0 which replaces keywords for HTML formatted objects. This works perfectly in my local lab environment but when installed on the hosted site (WHM/cPanel) it causes issues with the administration area and prevents the administrators from editing the articles.

When the administrator clicks on a article to edit the page attempts to load then appears to go back to the same page. I have developed this as a front-end plugin only so I shouldn't affect the administration area.

The problem is also preventing admin from creating anything new (news, blogs, content, menu items etc.)

As this does not happen within my lab I can only assume the issue is with some server settings which I may need to enable/disable. I have complete administrative access to both WHM, cPanel and Joomla so can change settings where ever needed...

Things I have observed:

The article URL changes from:

/administrator/index.php?option=com_content&view=article&layout=edit&id=7

to:

/administrator/index.php?option=com_content&view=article&layout=edit&id=7

when the plugin is enabled. Notice the ampersand has changed to amp;. This makes me think it could be something to do with UTF-8 character encoding has been set in MySQL to utf8general_ci.

Any pointers on configurations I may need to change would be greatly received.

Question: How do I prevent this from occurring (without removing my essential plugin).

Was it helpful?

Solution

If you create System Plugin that should work only on front-end you have to check in your plugin if current page is front-end. You can do it using this function: JFactory::getApplication()->isSite() or JFactory::getApplication()->isAdmin()

Example usage (I assume you use onAfterRender event):

function onAfterRender() {
    // Exit if current page is from Administration panel
    if( JFactory::getApplication()->isAdmin()  ) return;

    /* your plugin main code goes here*/
}

It will prevent your plugin from modifying administration panel output. If you already done it and it does check like it should to, there is no way that reason of your problems is that plugin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top