Error in SQL

Ask the community for help and support.
Post Reply
Melk
Posts: 5
Joined: Thu Aug 13, 2020 8:33 pm

Error in SQL

Post by Melk »

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: 2423
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 49 times
Been thanked: 137 times

Re: Error in SQL

Post by burt »

On what page is this error ?
What steps would I need to take to replicate the error ?
Gamechanger Addon: Queued Emails, try before you buy.
Melk
Posts: 5
Joined: Thu Aug 13, 2020 8:33 pm

Re: Error in SQL

Post by Melk »

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
Joined: Thu Aug 13, 2020 8:33 pm

Re: Error in SQL

Post by Melk »

...
You do not have the required permissions to view the files attached to this post.
Melk
Posts: 5
Joined: Thu Aug 13, 2020 8:33 pm

Re: Error in SQL

Post by Melk »

...
You do not have the required permissions to view the files attached to this post.
burt
Lead Developer
Lead Developer
Posts: 2423
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 49 times
Been thanked: 137 times

Re: Error in SQL

Post by burt »

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.
Gamechanger Addon: Queued Emails, try before you buy.
Melk
Posts: 5
Joined: Thu Aug 13, 2020 8:33 pm

Re: Error in SQL

Post by Melk »

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: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Error in SQL

Post by ecartz »

Melk wrote: 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