Jump to content


Photo

Version custom module view error

Error parsing formula. Formul

  • Please log in to reply
3 replies to this topic

#1 vijayviswa

vijayviswa

    Member

  • Members
  • PipPip
  • 13 posts

Posted 03 April 2019 - 02:13 AM

Hi,

 

I am using version 7.1 i have created a custom module in this version.It's working fine. But when i try to fill the form and after the data will show in view format at that time i got this type of error "Error parsing formula. Formula does not begin with "="". Please suggest me to solve this issue in version 7.1.

 



#2 Justin

Justin

    x2force

  • Moderators
  • 25 posts

Posted 03 April 2019 - 11:22 AM

Hi vijayviswa!

 

The issue here could be because one of the fields you are basing your formula off of could be "null" when calculating. The formula will not work if ex) A + B = C, and B is Null. 

Some fixes you can make would be to make the default value something else other than "null"!

 

 

Sincerely,

Justin



#3 vijayviswa

vijayviswa

    Member

  • Members
  • PipPip
  • 13 posts

Posted 03 April 2019 - 11:13 PM

Thanks for your reply justin,

 

My php version is 7.2 i already installed x2crm version  7.1 on that php version. But every time i got this error.

 

Error Code: 500
Error Message: count(): Parameter must be an array or an object that implements Countable
Stack Trace: [click to toggle display]
X2Engine Version: 7.1
PHP Version: 7.2.11

 

and also i can't able to run my modules.please suggest me to solve this issue.



#4 Justin

Justin

    x2force

  • Moderators
  • 25 posts

Posted 08 April 2019 - 09:23 AM

No Problem vijayviswa!

 

It does sound like a default issue. When count() is being used it is expecting an array() or an object that is countable. "Null" in this case would not be countable. My suggestion is what ever you are using to count() change the default value in the SQL database to something countable. For example numbers like 0 or 1 :)

 

The reason why this error started to occur is because from PHP7.2 they decided to deprecate count() to not return a 0 but an error for non-countable types. 

https://www.php.net/...ction.count.php

7.2.0 count() will now yield a warning on invalid countable types passed to the array_or_countable parameter.

 

Hope this helps!!

 

Sincerely,

Justin Toyomitsu






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users