0 - syntax error, unexpected '==' (T_IS_EQUAL)

Without seeing the code, I can't help. All I can tell you is that ...

1 () JROOT/components/com_fabrik/models/validation_rule.php(157) : eval()'d code:1

... means the error is in your code in one or more of the Conditions on a validation.

-- hugh
 
Well there's no code to show anymore as I removed it. So with no code the validation still fails. I can try looking through all my other validations or unpublishing component by component to see if I end up with just one that fails. May have to do trial by elimination
 
Yup. I can't tell you which element that validation issue is on, just that the error you gave me, I can 100% guarrantee it's to do with your evel'ed code in a Condition. Note that I'm not entirely sure if doing a "return require ..." when the required file is empty (if you've commented everything out) would throw an error or not, not something I've ever tried, but worth bearing in mind. Might want to throw a 'return true;' in the file just to make sure it's legal PHP that returns a value.

I just tried logging in to take another quick look, but it's back to 'blocked or not activated'.

-- hugh
 
OK, what I see now is:

An error has occurred with a eval'd field - please inform the web-site owner.
Debug: Caught exception on eval in validation condition : Use of undefined constant No - assumed 'No'

... which means you have some code which does something like ...

if ($foo == No) {

... where there should be quotes around the 'No'.

-- hugh
 
Issue was placeholder without quotes as you stated in one of your earlier posts. I went through everything and found 8 validations with this problem, I corrected them and now no longer get the 500. Thanks a million man!
 
I should also mention debugging the value of the $condition variable at line 147 in components/com_fabrik/models/validation_rule.php made it easier to figure out which components needed the correction.

line 147: $condition=trim($w->parseMessageForPlaceHolder($condition, $post));

The output from my logging which pointed to the bad code as per your insight in the thread above:

2018-08-15.18:15:47-....php: -------- START -----------
2018-08-15.18:15:47-....php: FabrikFEModelForm
2018-08-15.18:15:47-....php: if( == 'No' || == '') {
return false;
}
2018-08-15.18:15:47-....php: -------- END -----------


Thanks again man. Great support.
 
At some point I'm going to add some better logging where we eval user code, to make tracking this stuff down easier. Usually, it's not so much of a problem - the service cycle tends to be you write some code, you test it, if it breaks you fix it. It only tends to be problematic when you do something like a major PHP upgrade, with stricter syntax, and things that a worked OK till now, because the previous version of PHP would have just shrugged off the problems, suddenly become fatal errors.

-- hugh
 
Well speaking of that I have some more issues since fixing this piece... would you prefer that I open a new thread or continue here? They are separate issues altogether. Whatever works best for you, I assume a new thread works better as people probably use the forum as a knowledge base. At least I do:)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top