CalcBuilder Forum

Error from Calcbuilder

User TheFencepedia 2024-07-21 19:35:14

Hi,

I have the Joomlashack error tracking plugin on my site, and today, when I tried to generate drawings from the Calcbuilder interface, I got this error report:

Error Code 0
Error Type ParseError
Message syntax error, unexpected identifier "Type"


I can forward you the actual email if you need it, and if you give me an email address to send it to.

Moonsoft support 2024-07-22 09:45:59

Hi,
that error seems to be related to the step where form data is recovered from the page and assigned to variables in other to process the php section. Please recheck the names you have given to your (latest added) variables, maybe you have used any reserved word, or any variable name that doesn't fit with php syntax rules. Not able to see your page because its password protected, but we suggest to check for any variable named 'Type' and change it because it shows at the error log.

Hope this helps, regards
Guillermo V.
Moonsoft Team

User TheFencepedia 2024-07-23 06:01:57

Hi,

Does that apply to ANY instance of Type in the name? For instance, if I have WoodType, would that still be a problem?

If so, that should probably be somewhere on that page,. Since it's not something people would automatically know. Also, if that is the case, I now need to change basically all my calculators.

Moonsoft support 2024-07-23 09:27:44

Hi,
the variable name needs to be a valid php variable name. So, the basic instructions are the ones present just below the 'variable' configuration field (a valid name starts with a letter, underscore....etc). But, like in any language there are also some reserved words in php, which are names that are used internally, following your suggestion we'll include also link at the description to check the current list. The name must match exactly to be 'invalid', so even if 'default' is a reserved word, you can use my_default, default3, or any other word containing that text. If your other calculators work, you shouldn't worry about the variable names for them, in case there was any syntax error the calculator wouldn't execute.

If you can provide an access, please share it (in private section of this ticket), and we'll check if your variable names are ok. Alternatively, you can export and zip your calculator and attach it to the ticket.

Best regards
Guillermo V.
Moonsoft Team

User TheFencepedia 2024-07-24 04:22:20

Hi,

Thanks. All my variable names are longer strings and none use "type" on it's own. It's always ProjectType or WoodType or something like that. So it can't have been that causing the error.

I haven't seen it again either, even though I've been testing my calculators. There are lots of them.

User TheFencepedia 2024-07-24 04:22:33

Hi,

Thanks. All my variable names are longer strings and none use "type" on it's own. It's always ProjectType or WoodType or something like that. So it can't have been that causing the error.

I haven't seen it again either, even though I've been testing my calculators. There are lots of them.

Moonsoft support 2024-07-24 18:03:59

Ok, then the issue can't be related to your variable names. If at any time you can share how to reproduce, just add the steps to this ticket and we'll take a look.

Thanks, regards
Moonsoft Team

...
List Manager

Build different lists for your site

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!