Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Database Problem between builds

[SOLVED] Database Problem between builds 20 Oct 2011 19:19 #290

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Hi sorry its me again! :)

Each time I run the sandbox I have to re-enter data and it oftem reports an error:
Table '[DATABASE].[PREFIX]demo658' doesn't exist SQL=INSERT INTO `[PREFIX]demo658` (`id`, `params`. . .
If I run the sandbox again after the error I get a 500 error:
View not found [name, type, prefix]: stccourseschedule,html,demo658View

This happens even if I dont change anything other than switching between the tables tab and the pages tab.

Any ideas?

Trying again today and still get the errors but after adding another page and additional error ocurs when I try to save :
Please select Y or N
Table 'ck_demo_cms15.jos_demo120_produits' doesn't exist SQL=SELECT `ordering` FROM jos_demo120_produits ORDER BY ordering DESC LIMIT 1 Error


Strange thing is that I don't have a table called produits!

Another update. . .
I downloaded the component and ran it on my server and it works OK except for the last error above. I checked the generated code and in the php file for the table in the tables folder I find:
//New row : Ordering : place to the end
if ($this->id == 0)
{
$db=& JFactory::getDBO();
$query = "SELECT `ordering` FROM #__demo120_produits ORDER BY ordering DESC LIMIT 1";
$db->setQuery($query);
$ordering = $db->loadObject();
$this->ordering = (int)$ordering->ordering +1;
}
Last Edit: 21 Oct 2011 08:21 by twev. Reason: More data after testing
The administrator has disabled public write access.

Re: Database Problem between builds 21 Oct 2011 11:27 #293

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Each time I run the sandbox I have to re-enter data and it oftem reports an error:
Table '[DATABASE].[PREFIX]demo658' doesn't exist SQL=INSERT INTO `[PREFIX]demo658` (`id`, `params`. .

This is a still opened issue.
After install in the sandbox, sometimes the component is not ready for data inserting because the installer runs too fast. I don't want to insert a delay, which is not the best idea. For now I don't know how to check when the component is ready.

Table 'ck_demo_cms15.jos_demo120_produits' doesn't exist SQL=SELECT `ordering` FROM jos_demo120_produits ORDER BY ordering DESC LIMIT 1 Error

This is solved for next version.
Coding is now a piece of cake
Last Edit: 21 Oct 2011 11:29 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: twev

Re: Database Problem between builds 21 Oct 2011 16:48 #299

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
There is another reference to DEMO120 in the code generated for the controller:
if (count( $cid ) < 1) {
JError::raiseWarning(500, JText::sprintf('DEMO120_ALERT_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST_TO', strtolower(JText::_("DELETE")) ) );
$this->setRedirect(StccoursesHelper::urlRequest());
return;
}


I seem to have used up loads of credits today so can't test anymore until I top up :(
I spent two hours this morning trying to workk around the problem above but whatever it was used more points than I have over the past few days.
Total 231 pts
Last changes 169.5 pts
Your account 0.00 pts


I will top up next week and try again.
Last Edit: 21 Oct 2011 16:56 by twev.
The administrator has disabled public write access.

Re: Database Problem between builds 24 Oct 2011 10:55 #316

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Ok, thanks for your bug review.

Karma +1.

About the points :
You didn't 'consume' points. the difference between 'Total' and 'Last changes' is just because you started to use Cook before the 1.4 transition. So all your work before this date is considered paid.

If you want to test out of the sandbox, you must credit your account, but you can still use the sandboxes.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Database Problem between builds 24 Oct 2011 11:15 #317

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
I have just subscribed to the Silver plan but the sandbox fails every time when it gets to restoring the database. The error is:
Table '[DATABASE].[PREFIX]demo658' doesn't exist SQL=INSERT INTO `[PREFIX]demo658` (`id`, `params`, `course_title`, `course_description`, `course_precis. . . .
I created a new simple project and the sandbox worked OK so I think I will start again and create the project from new, it's not too big.
The administrator has disabled public write access.

Re: Database Problem between builds 24 Oct 2011 12:01 #319

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Thanks for your Silver account.

Don't rebuild a new project.

I check this today.

The problem is that restoring process start when component is not completly installed.

I added i dirty sleep for now, because I don't know how to get a clean trigger when installation is finished.

Please retry building your project, now.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Database Problem between builds 24 Oct 2011 12:16 #320

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Oh no, shame on me, It is not the problem I described before.

The table name is not complete. (demo658, should be demo658_coursedetail)


I saw in your component that the table course_detail is not correctly saved.

You must validate the form, in order to autogenerate (or define manualy) an item alias of your table.

This can be the problem you are facing.


Note : I see you don't use properly the titles. You don't need to use underscores ('_') in the titles of your tables, neither for layouts. Use litteral strings with all caracters you want. Aliasing is automatic. Because the titles are important to pages labeling, comments in your code, and so...
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Database Problem between builds 28 Oct 2011 14:31 #365

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I see on my monitors that you raised this same error 4 times since yesterday.

But I still not understand from where is it comming !
I check more deep your files.

Stay in touch...

PS : Nice avatar. Good state of mind.
I really appreciate.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Database Problem between builds 28 Oct 2011 14:48 #366

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Ok, I got it !

A table has the same alias than the project.


Well, as you can see in your final project, if a table has the same alias than the project, the database table name is reduced. ex : #__events instead of #__events_events.
(A little functionality that testimonial how we take cure of your final project).

BUT, in the sandbox, your project alias is demoXXX, so it cannot reduce the table name. When it install the component No, and when it backup, YES. So this conflict is causing a big issue.

I am currently solving this problem. For now, just change the collection alias of the Events table, and it will pass. Then, after the fix, you'll can restore the 'events' alias.

Coool, finaly !!
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Database Problem between builds 28 Oct 2011 16:12 #368

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Well spotted, many thanks.
It seemed strange that there were no problems when I ran it on the production server but that answers it.

Trevor
The administrator has disabled public write access.

Re: Database Problem between builds 29 Oct 2011 14:34 #375

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Solved since 1.4.3
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.102 seconds

Get Started