Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Trouble with Layout Boxes Controller

Trouble with Layout Boxes Controller

Views: 3,133

Results 21 to 34 of 34
26 Mar 2016, 9:26 PM
#21
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Trouble with Layout Boxes Controller

webskipper:

i misunderstood you the first time, doc.

So, what you are saying is reset all int(#) to zero?
noooooooo!

26 Mar 2016, 9:36 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Trouble with Layout Boxes Controller

Your database is borked. Whatever you did lost the auto-increment attribute on several, perhaps all, tables. That could have been because of a wrong setting when making a backup that you later imported, or something about the way you imported the data.
I'm strongly inclined to say you need to re-do your database import.

This is why I always do my upgrades by staging them on a test database, and then when everything's tested and solid I do the actual upgrade against the real live database, so that I never have to risk an export/import mucking up my actual original data. All explained at http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

Anyway, I'll re-write the ultra-long version of what I was saying previously:

a) Auto-Incrementing is used to tell the database to auto-assign "the next available integer value" to the particular field in the database when doing inserts of new records. This causes every record to have a unique identifier, and also aids in indexing for performance. You can see that most of these tables have the auto-increment attribute on the xyz_id field (note the _id suffix which is often used). It's also supposed to set the primary-key of (most of) those tables to be that same _id field, to enforce uniqueness.

b) because of your tables not having the necessary auto_increment flag, you've not got lots of tables which now have records with an id of 0 instead of sequential numbers ... this probably has also affected all your customers and orders, as well as products, etc ... whatever has been added since you imported this damaged data

c) and now you can't just flip the field to be auto-increment and fix the primary key, because you've got records in those tables that have duplicate (non-unique) values: ie: multiple records with 0 as the id. Not only is 0 invalid for an auto-increment field, but if you have more than one 0 record then you've got duplicates ... all of which you need to clean up before you can fix the table-definition/structure.

So ... that's why I said to delete the records with layout_id of 0, then fix the table structure, then use the Reset Layout Boxes button to re-insert the records, which should then get real numbers instead of 0.

But, even if you do that, if you've got other tables with the same autoincrement problem, then you're going to have other ugly issues such as add-to-cart not working, sessions not working, unable to add new customers, unable to assign unique order numbers, customers getting the same order-id as other customers, and more.

26 Mar 2016, 9:59 PM
#23
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Trouble with Layout Boxes Controller

DrByte:

Your database is borked. Whatever you did lost the auto-increment attribute on several, perhaps all, tables. That could have been because of a wrong setting when making a backup that you later imported, or something about the way you imported the data.

And has Kobra discussed with you today the fact that importing a DB fix into 155 becomes borked?

DrByte:

This is why I always do my upgrades by staging them on a test database.

Me too. Only this time around somehow the borked demo site borked my live site. That's why I'm working hard to get it right.

So, all I'm worried about is spending the time to setup a new shop and importing the product descriptions from the old DB line by line instead of by tables only to find out that the new site is borked.

26 Mar 2016, 10:36 PM
#24
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Trouble with Layout Boxes Controller

Since you have seen the DB I'm working with, are the categories and Products tables salvageable or are ok to transfer to a fresh DB?

This will save a lot of time. Thanks.

26 Mar 2016, 10:44 PM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Trouble with Layout Boxes Controller

I haven't seen the DB.
If you want to PM me with a link to a zip of the database, I'll download it and take a look.

26 Mar 2016, 10:44 PM
#26
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Trouble with Layout Boxes Controller

webskipper:

And has Kobra discussed with you today the fact that importing a DB fix into 155 becomes borked?
No. I've no idea what you're talking about there.

29 Mar 2016, 7:41 PM
#27
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Trouble with Layout Boxes Controller

Admin > Configuration > Layout Settings > Column Right Status - Globals were off.

Whoops didn't know this had to be selected. Thanks for everyone's help.

29 Mar 2016, 7:49 PM
#28
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Trouble with Layout Boxes Controller

In the admin
admin > layout settings > ACTIVATE Responsive Template > in the right column is this
So this template does not allow right columns and does not respect the settings in the admin

Column Width - Left Boxes &
Column Width - Right Boxes
DO NOT WORK WITH
(1)Responsive Template Settings

29 Mar 2016, 9:48 PM
#29
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Trouble with Layout Boxes Controller

kobra:

In the admin
admin > layout settings > ACTIVATE Responsive Template > in the right column is this
So this template does not allow right columns and does not respect the settings in the admin
Just to be clear, none of these are part of core Zen Cart ... that text/button you mention is from an addon

30 Mar 2016, 12:30 AM
#30
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Trouble with Layout Boxes Controller

DrByte:

Just to be clear, none of these are part of core Zen Cart ... that text/button you mention is from an addon
Beg to differ
ACTIVATE Responsive Template is the first entry in layout settings in a stock 1.5.5 install

But I was incorrect stating that right columns are not allowed

30 Mar 2016, 12:57 AM
#31
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Trouble with Layout Boxes Controller

I beg to differ, this is NOT a 1.5.5 configuration.

This is in fact a DIY configuration which isn't used in v1.5.5 and any of the newest versions of the DIY responsive components.

kobra:

Beg to differ
ACTIVATE Responsive Template is the first entry in layout settings in a stock 1.5.5 install

But I was incorrect stating that right columns are not allowed

30 Mar 2016, 1:06 AM
#32
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Trouble with Layout Boxes Controller

To add, if the OP is converting using a template for v1.5.5, simply making the following changes outlined here , uploading the template files and running the templates included sql or installer will work.

I have personally downloaded every pica-flor azul template, following the above and they all work without incident.

rbarbour:

I beg to differ, this is NOT a 1.5.5 configuration.

This is in fact a DIY configuration which isn't used in v1.5.5 and any of the newest versions of the DIY responsive components.

30 Mar 2016, 1:06 AM
#33
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Trouble with Layout Boxes Controller

Well,
I know that much has been changed - but a stock install I have from mid Feb has this...

Just overloaded the latest file set and it is still there
Must be in the database I suspect

30 Mar 2016, 1:17 AM
#34
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Trouble with Layout Boxes Controller

All the responsive templates in the plugins section (by Anne and myself) have this configuration and if installed, it will be added to the database. All I'm saying is it's not a stock v1.5.5 configuration.

kobra:

Well,
I know that much has been changed - but a stock install I have from mid Feb has this...

Just overloaded the latest file set and it is still there
Must be in the database I suspect