Bug: Form email plugin failing on back end.

LOGGED Bug: Form email plugin failing on back end.

I have a form and one of its plugins is causing the following error in the back end only... in the front end it works like a charm :).

Fatal error: Call to undefined method JAdministrator::getParams() in /home/thelodge/public_html/components/com_content/models/article.php on line 49

Snapshot of the plugin attached.
 

Attachments

  • plugin.JPG
    plugin.JPG
    49.3 KB · Views: 122
hello,

I am not on pc at the moment so can't tell if your version number is in your sig but if not can you please post your fabrik and joomla version number and whether you have updated from GitHub.

also please check the plugins access levels in plugin manager as this has thrown me a few times.
 
Looks like an issue we had solved prior to 2.5.x is rearing it's ugly head again, to do with using J! content articles as templates in the backend. This involves code which is usually only run on the front end, and falls over if run from the backend.

Here's how we worked round it prior to 2.5.x, in the email plugin, when we fetch the article text ...

PHP:
		// $$$ rob when sending from admin we need to alter $mainframe to be the
		//front end application otherwise com_content errors out trying to create
		//the article
		global $mainframe;
		$origMainframe = $mainframe;
		jimport('joomla.application.application');
		$mainframe = JApplication::getInstance('site', array(), 'J');
		$res = $articleModel->getItem($contentTemplate);
		$mainframe = $origMainframe;

... but that no longer works, and we're hitting the same issue again, with the content model trying to access front-end only methods, using a JAdministrator object instead of a JSite object.

I don't immediately see a workaround for this, so I'll have to raise a github ticket and let Rob take a look.

We may just have to ignore the J! model code, and grab the article text directly from the database.

-- hugh
 
should be fixed @github now, indeed I had to end up querying the database directly - seems the only possible way
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top