Fabrik 3 content plugin in article error

wmackay

New Member
Hi
I'm using Fabrik 3.06 and Joomla 2.5.6.

When I use the content plugin in an article {fabrik view=form id=18 row=1} I get the following errors depending on browser.

Chrome: SyntaxError: Unexpected token <
Firefox: SyntaxError: JSON.parse: unexpected character
IE9: [object Error]

The list is a simple 2 element list and the element I want to edit is a databasejoin.

The form works fine if I use it directly from a menu.
 
Can you look in Firefox, using FireBug. When you get the error, open the Console tab in FireBug, and you should see one or more POST lines, where Fabrik is sending AJAX requests to the server.

Open those up and look at the Response section. You'll probably find that at least one of them has a PHP warning at the top.

Let me know what you find.

Or ... point me at the page, and I'll take a look.

-- hugh
 
OK - here's what I get

<br />
<b>Notice</b>: Trying to get property of non-object in <b>/home/wmackay/public_html/school/test/plugins/system/jumi/jumi.php</b> on line <b>30</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/home/wmackay/public_html/school/test/plugins/system/jumi/jumi.php</b> on line <b>39</b><br />
{"msg":"Record added\/updated","url":"http:\/\/comoxcomputers.com\/school\/test\/index.php\/profile","baseRedirect":true,"rowid":"272","reset_form":true}: SyntaxError: JSON.parse: unexpected character

I have Jumi v2.0.6 installed but not calling it in on this article. The only thing in this article is the one line for Fabrik content.

I've attached the jumi.php file and flagged the 2 offending lines.
 

Attachments

  • jumi.php.txt
    5.4 KB · Views: 385
Not a Fabrik problem. No idea why that JPluginHelper::getPlugin() call is failing in their code, but it's obviously not returning anything, hence the "non-object" warnings when the rest of the code tries to access $plugin.

You'll need to talk to the Jumi folk about that one.

-- hugh
 
PS, you could "fix" things by setting the error reporting level to none (or low) in your J! global config, or in your PHP.ini (exclude E_NOTICE). As that's only 'Notice', it isn't killing your site, and all you really need to do is suppress that warning, so it doesn't mess up the JSON format of the response to our AJAX call.

BTW, what is the URL being called for that AJAX call that has the error response in it? It should have &format=raw somewhere in the URL.

I'm not even sure why Jumi is trying to run on that. You may want to talk to the Jumi folk and suggest that they check for format=raw in the request, and not attempt to do any processing onAfterRender if it is a 'raw' request.

If you want to hack the Jumi file yourself, put something like ...

PHP:
if (JRequest::getVar('format', '') == 'raw') {
   return;
}

... right at the start of their onAfterRender() method, around line 25.

-- hugh
 
Turning off error reporting didn't help but I got the following messages:

Back end:
Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 20

Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumi/jumi.php on line 25

Front end:
Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 20

Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 33

Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 35

Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 36

Strict Standards: Only variables should be assigned by reference in /home/wmackay/public_html/school/test/plugins/system/jumirouter/jumirouter.php on line 55

The URL only shows the name of the menu item. I'm calling the form directly from the main menu.

The suggested Jumi hack fixed it. The "Record added/updated" now appears in a popup but the form executes properly.

That's good enough for me.

Thanks for the extra effort.
 
PS - Got those error reporting messages by setting Joomla Global Configuration>Server>Error Reporting>Development
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top