Error in SQL

Post general questions here for help using CE Phoenix.
Post Reply
Melk
Posts: 5

Error in SQL

Post by Melk » Thu Aug 13, 2020 8:42 pm

I installed CE Phoenix, and when installing the translation for my language (portuguese brazil) there was an error in the database table.
Can anyone help me fix this error?


error report:


1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM ORDER BY c.customers_id LIMIT 5' at line 1

SELECT FROM ORDER BY c.customers_id LIMIT 5

burt
Lead Developer
Lead Developer
Posts: 646
Has thanked: 1 time

Re: Error in SQL

Post by burt » Thu Aug 13, 2020 9:00 pm

On what page is this error ?
What steps would I need to take to replicate the error ?

Melk
Posts: 5

Re: Error in SQL

Post by Melk » Thu Aug 13, 2020 9:55 pm

After I installed the translation into Brazilian Portuguese (pt-BR), my language, the site lost communication with the database.

HTTP ERROR 500 - corrupted files

The error is reported by the site administration area.

There are errors in some tables which I do not know the steps to fix.

I will send prints of the administrative area of the site where the errors appear.
You do not have the required permissions to view the files attached to this post.
Last edited by Melk on Thu Aug 13, 2020 10:12 pm, edited 1 time in total.

Melk
Posts: 5

Re: Error in SQL

Post by Melk » Thu Aug 13, 2020 10:00 pm

...
You do not have the required permissions to view the files attached to this post.

Melk
Posts: 5

Re: Error in SQL

Post by Melk » Thu Aug 13, 2020 10:25 pm

...
You do not have the required permissions to view the files attached to this post.

burt
Lead Developer
Lead Developer
Posts: 646
Has thanked: 1 time

Re: Error in SQL

Post by burt » Thu Aug 13, 2020 11:22 pm

I think you will need to contact the maintainer of the PT-BR language files and ask them if they have the time to update it.
An update of the PT-BR language files is not something that we (core team) can do as none of us speak your language.

We do note this in the main readme for Phoenix;
Please be aware that language packs are maintained by volunteers so may not be up to date.

Melk
Posts: 5

Re: Error in SQL

Post by Melk » Thu Aug 13, 2020 11:35 pm

ok, got it, i will try to contact the person who translated the package from my language.

Thank you

ecartz
Lead Developer
Lead Developer
Posts: 483

Re: Error in SQL

Post by ecartz » Fri Aug 14, 2020 8:48 am

Melk :
Thu Aug 13, 2020 8:42 pm
I installed CE Phoenix, and when installing the translation for my language (portuguese brazil) there was an error in the database table.
Can anyone help me fix this error?


error report:


1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM ORDER BY c.customers_id LIMIT 5' at line 1

SELECT FROM ORDER BY c.customers_id LIMIT 5
I believe that this error would occur on the admin index.php page (this is the question that Burt was asking, where the error was occurring). It looks like it is having trouble loading the customer data modules. I'm a bit hazy on what would cause a language change to break the customer data modules. But that seems to be what is happening. It's possible that we should find a way to show a more informative error in this case. I'll try to remember to get back to it. In the near term, you could go to admin > Modules > Dashboard and turn off the customers module, as that is what seems to be breaking.

For everything else, it seems pretty obviously a set of missing language constants. It can't find, e.g. BOX_HEADING_LAYOUT, so PHP assumes that you want to use the string BOX_HEADING_LAYOUT. Looking at the missing ones, I'm guessing that this hasn't been updated since at least 1.0.5.0. Because the constants introduced in 1.0.5.1 are clearly missing. E.g. MODULE_CFG_MODULE_CUSTOMER_DATA_TITLE.

Note that it would be possible for you to fix this yourself. For each thing like BOX_HEADING_LAYOUT, look in the English files for it. You'll find something that looks like

Code: Select all

const BOX_HEADING_LAYOUT = 'Layout';
or

Code: Select all

define('BOX_HEADING_LAYOUT', 'Layout');
Copy that line to the equivalent place in your pt-br language files and change the right side string to Portuguese. Something like

Code: Select all

const BOX_HEADING_LAYOUT = 'Portuguese here';
But of course it would likely be easier for the person who did the original translation to extend it.

In my experience, the admin doesn't translate that well. It would often be easier to view it in straight English rather than trying to view it partially in Portuguese. This is because some things are stored in the database as English. So even if all the language files are fully translated, you'll still see a bunch of English words all over the place.

Post Reply