Form Syntax Error - HELP!

createforme

Member
I have Fabrik 3.9, Joomla 3.9.6

All I want is to call up a form to add to a list. I keep getting this error:
0 syntax error, unexpected '||' (T_BOOLEAN_OR)

I have no idea what to fix. I didn't change anything and it was working before. It was just the update that broke it.
 
I would create a new list to see if adding a new record to the new list gives the same error message. In this case, it could be some incompatibility between the last official Fabrik release and the last Joomla update.

Anyway, I use the last Fabrik code from github and the last Joomla version and there are no problems to me.

P.S.: I hope you do backup before updating your joomla version...
 
Joomla update, Fabrik upate, php update...?
Check all your custom code in your form (calc elements, php plugins, conditions etc).
 
I updated everything from the github and it still isn't working on the front end (I don't have any custom code, it's just basic tables of information). I did notice, however, the forms work on the backend for adding data if that helps anyone help me.
 
If it's working in the backend but not in the frontend it may be an issue with your Joomla template or some other component.
Try with the Protostar template coming with Joomla, try disabling other 3rd party components, plugins etc.

I didn't change anything and it was working before. It was just the update that broke it.
So what did you update exactly?
From which versions to which versions?
 
Can you get any more information about the error, like a file and line number? Maybe enable J! debug and turn error reporting up to max?

-- hugh
 
troester, here's one big issue - I'm managing this site for an organization that is not very organized. Several months ago someone took over management of this database. During that time, I performed the standard Joomla updates (a few weeks after release) and then any Fabrik updates that were available. I did not realize this form was broken until a new person from the organization took back over this week. So, I have no idea which update broke the form.

I checked on the protostar template and the form is still broken on the frontend. I don't think it's another plugin or issue (though I'm not sure) because there's really nothing going on in this site except Community Builder user list and Fabrik tables that connect to it. VERY basic.

Hugh - here's the information I could find (I'm not sure what helps you, but I'd be happy to give backend access):

.../components/com_fabrik/controllers/form.php:154
153 || in_array($input->get('format'), array('raw', 'csv', 'pdf')))
154 || in_array($input->get('format'), array('raw', 'csv', 'pdf'))

.../plugins/system/redirect/redirect.php:112
KExceptionHandlerAbstract->_handleException()
exception ParseError#a72a

PlgSystemRedirect::doErrorHandling()
.../plugins/system/redirect/redirect.php:91
 
Well, maybe I'm smarter than I think. I guessed that the lines 153 and 154 above were duplicated unnecessarily. I deleted the one with ")))" at the end and this seems to have worked. My form is working now. Not sure how they got duplicated or if this was a bad fix. Let me know!
 
.../components/com_fabrik/controllers/form.php:154
153 || in_array($input->get('format'), array('raw', 'csv', 'pdf')))
154 || in_array($input->get('format'), array('raw', 'csv', 'pdf'))
Where did you find this? I can't see it in .../components/com_fabrik/controllers/form.php
 
Nope, nothing like that in the form controller. The only code that looked like that was taken out about a year ago.

-- hugh
 
I updated everything from the github
It seems you didn't, the code rows you mention are not in GitHub.

And even in the old version (before Jul 2018) there was no "duplicate" row.
It's looking like you are not running an official Fabrik version. Maybe somebody tried to add code manually.

Are you sure all your Fabrik is showing 3.9 version?
I would do a complete GitHub update again (after a backup).
 
Last edited:
Here's line 154 in github:

https://github.com/Fabrik/fabrik/blob/master/components/com_fabrik/controllers/form.php#L153

... and as you can see, nothing like the lines you quoted. One of those lines (not both) used to be there until about a year ago, when it got replaced with a call to a new helper function, Worker::useCache(), now at line 176.

Do a full github update. Make sure your ftp client is set to "always overwrite". Check the error log to make sure all files uploaded.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top