Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Database error 04 Jun 2013 18:34 #7325

Hello,

I tried creating an extension, but in the sandbox, I got the following error:

500 SQL=SELECT a.id, a.title, a.checked_out, a.checked_out_time, a.created, a.hits,l.title AS language_title,uc.name AS editor,ag.title AS access_level,c.title AS category_title,ua.name AS author_name FROM xh3ui_content AS a LEFT JOIN `xh3ui_languages` AS l ON l.lang_code = a.language LEFT JOIN xh3ui_users AS uc ON uc.id=a.checked_out LEFT JOIN xh3ui_viewlevels AS ag ON ag.id = a.access LEFT JOIN xh3ui_categories AS c ON c.id = a.catid LEFT JOIN xh3ui_users AS ua ON ua.id = a.created_by ORDER BY a.hits DESC LIMIT 0, 5

This error appears in Joomla 1.6 and in Joomla 3.0 settings (didn't try the other versions yet)
The error also occurs in the downloaded extension.

If you wish, I will gladly supply you with the component in question.

Please Log in or Create an account to join the conversation.

Re: Database error 04 Jun 2013 18:38 #7326

Extra addition: when installing the downloaded extension, it doesn't work on a live site either... when uninstalling the extension, it effectively breaks the database (at least in a Joomla 3 setting).

I assume this is a risk of using beta software. (luckily I only used it on a beta site)

Grtz,
Jurgen

Please Log in or Create an account to join the conversation.

Re: Database error 04 Jun 2013 18:45 #7327

I figured out the issue myself: it is possible to use names of already existing tables.
I created a table "languages" - it failed in creating it (as it already existed) thus it threw an error when trying to use it.

On uninstalling, it removes the core table and breaks the site.

Suggestion: Add a component prefix to the tables - so for com_mycomponent, the tables would become:
#_mycomponent_languages
#_mycomponent_members

(actually, I faultly assumed this)

This prevents the component of breaking tables for the core joomla or other extensions.

Please Log in or Create an account to join the conversation.

Re: Database error 05 Jun 2013 09:09 #7337

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Wich component is causing the error ?

Maybe something wrong with the checked out feature...

The SQL string error is indirectly coming to your component wich is asking something to Joomla.

What are the names of the database tables of your downloaded component ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Database error 05 Jun 2013 13:55 #7345

Hi,

the component I'm working on is called Mailbridge.

The tables are: "languages" and "members"
Effectively the "languages" table iinterferes with the core tables from Joomla.

Renaming this table fixed the issue. (it can break a system though)

PS. The error also occurs in the old version, so isn't inherent to the beta.

Please Log in or Create an account to join the conversation.

Last edit: by JurgenG.

Re: Database error 05 Jun 2013 14:07 #7347

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Ok, will check it soon.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Database error 05 Jun 2013 14:29 #7349

Don't know if I should submit this as a new bug, or just report it here (as it arose during the same process)

When renaming the table "languages" to "MM_languages", it would be nice if all occurances of the old "languages" would also be renamed. I manually changed the "foreign table" link (removed it and put a new one).

Strange enough, in the PAGES view, the old reference still appears in the left column - can't seem to update that link. Obviously, the compilation fails as it can't find the languages table

Please Log in or Create an account to join the conversation.

Re: Database error 09 Jun 2013 20:23 #7402

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Should be fixed. (v2.5.1)
www.j-cook.net/index.php/docs/versions/75-2-5-1

Please try again.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.094 seconds

Freakin' Awesome!!! J-Cook is simply awesome - whether you're a highly experienced developer or complete novice whether you're building a small inventory component or a complete community solution! The beauty comes from a fast slick and reliable platform that readily provides developers with everything they'll need to build the backbone of a solid and secure component with wizards for authoring access publishing aliasing created/modified by dates... you name it COOK provides it! J-Cook really surpasses all of the 'competition' as far as MVC tools are concerned! Try love it and get cooking!
learnthrusong (JED)
          

Get Started