Zen Cart Logo
Forums / General Questions / Strange problem with zen cart - Admin preview problems after Access db load

Strange problem with zen cart - Admin preview problems after Access db load

Locked

Views: 4,147

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
26 Jul 2007, 2:44 AM
#1
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Strange problem with zen cart - Admin preview problems after Access db load

I am having a very strange probem with Zen cart.

The problem is that with some products, when I edit them and then click Preview (to save) the site takes me to the homepage of my shoppping site (rather then the preview confirmation page as it should).

Ths only happens with some products - particularly older ones - and we believe it was due to someone trying to connect to the database using an access database (No idea why but no other potential trigger is known).

This problem is puzzeling in itself - but the real puzzel is if I tell the PHP page to exit on load (while i try to debug) the system still redirects to the home page where this problem is happening. I.e. a different page is served in response to the POST request then the one that is supposed t be with no in page redirect.

Do you Have you got any suggestions for either problem?

Thanks,

Shlom Solomon

26 Jul 2007, 4:24 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

A few questions ...

  • do you have any FORMs in your product descriptions?
  • do you have any HTML code other than markup related to appearances?
  • are there any images embedded in your prod-description HTML?
  • what version of Zen Cart?
  • what addons have you installed?
  • what kinds of customizations have you made to your site?
  • what is the URL saying when you get redirected? Does it flicker to something else briefly? if so, what?
26 Jul 2007, 4:28 AM
#3
stage avatar

stage

New Zenner

Join Date:
Jun 2007
Posts:
54
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

ExceedIT:

I am having a very strange probem with Zen cart.

The problem is that with some products, when I edit them and then click Preview (to save) the site takes me to the homepage of my shoppping site (rather then the preview confirmation page as it should).

Ths only happens with some products - particularly older ones - and we believe it was due to someone trying to connect to the database using an access database (No idea why but no other potential trigger is known).

This problem is puzzeling in itself - but the real puzzel is if I tell the PHP page to exit on load (while i try to debug) the system still redirects to the home page where this problem is happening. I.e. a different page is served in response to the POST request then the one that is supposed t be with no in page redirect.

Do you Have you got any suggestions for either problem?

Thanks,

Shlom Solomon

It sure sounds as if you have some database corruption going on. I would start there, poke around a little and see if something looks out of place. Do you have any type of URL rewriting going on? LIke the Ultimate SEO's, I haven't myself used that particular mod, but with other systems I've used code rewriting types of tools and when there was a glitch, it caused the same sort of problem you are describing.

What happens when you click on the products in question from the front end?

stage

30 Jul 2007, 11:17 AM
#4
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

A few questions ...

  • do you have any FORMs in your product descriptions?
  • do you have any HTML code other than markup related to appearances?
  • are there any images embedded in your prod-description HTML?
  • what version of Zen Cart?
  • what addons have you installed?
  • what kinds of customizations have you made to your site?
  • what is the URL saying when you get redirected? Does it flicker to something else briefly? if so, what?

Hi,

Thanks for helping with this. Taking your points in turn

  1. No other content in the forms other then plain text and standard appearance markup - everything was ok to start with until the Access incident

  2. No images embedded - its all very simple

  3. Zen cart 1.3.7

  4. No addons (as far as I know)

  5. No customisations at all - problems started when I tried to access DB via Access database but other then that all code has not been touched (other then to try and debug this issue as mentioned)

  6. It starts to load the correct URL (i.e. admin/products.php etc) then suddenly changes to the homepage as if a redirect has been triggered - as mentioned I have tried to terminate on teh first line of products.php but this still happens

30 Jul 2007, 11:19 AM
#5
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

stage:

It sure sounds as if you have some database corruption going on. I would start there, poke around a little and see if something looks out of place. Do you have any type of URL rewriting going on? LIke the Ultimate SEO's, I haven't myself used that particular mod, but with other systems I've used code rewriting types of tools and when there was a glitch, it caused the same sort of problem you are describing.

What happens when you click on the products in question from the front end?

stage

What do you mean by URL rewriting and ultimate SEO's

I am also inclined to think its something to do with the DB but I cannot imagine what given the strange redirection even out of the script - the whole redirection symptoms is very strange for a database probelm.

I have tried repairing some tables in phpmyadmin to see if it helps but no joy.

30 Jul 2007, 11:34 AM
#6
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

PS: with regard to the databse - I have tried recreating the database by creating a new one and copying all the data using SQL and the problem remains - i.e. adding new products fine, old products redirect to homepage.

30 Jul 2007, 3:48 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

In your product descriptions, are there any embedded URLs or images or other HTML that might be confusing things?
Is there any embedded PHP code?

Admin->Configuration->My Store->Missing Page Check ... what is this set to? If you turn it Off, what happens differently?

30 Jul 2007, 4:01 PM
#8
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

In your product descriptions, are there any embedded URLs or images or other HTML that might be confusing things?
Is there any embedded PHP code?

Admin->Configuration->My Store->Missing Page Check ... what is this set to? If you turn it Off, what happens differently?

I tried what you said - the option is set to "Page cannot be found" and when I change it to Off then it makes no difference at all - still redirects to homepage

30 Jul 2007, 4:52 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

What is the storefront URL to a product which you have problems editing in the admin ?

30 Jul 2007, 5:30 PM
#10
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

What is the storefront URL to a product which you have problems editing in the admin ?

This product cannot be edited

http://www.worldoftoys.ltd.uk/store/index.php?main_page=product_info&cPath=4&products_id=60

This one can

http://www.worldoftoys.ltd.uk/store/index.php?main_page=product_info&cPath=10&products_id=122

as can this

http://www.worldoftoys.ltd.uk/store/index.php?main_page=product_info&cPath=10&products_id=149

and I think generally the more recent ones can be edited - most likely the ones added after the problem started before it was noticed.

30 Jul 2007, 7:48 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

It might be related to the excess markup junk that MS editors insert when editing HTML content. The product you mentioned as not being editable contains typical MS markup tags:```html

<p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Use these bright progressive jigsaw puzzles of favourite farmyard animal pictures and begin to count first numbers.<o:p /></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Silver award winner.<o:p /></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Links with Early Learning Goals in Knowledge and Understanding of the World; and Mathematical Development.<o:p /></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Age: 2+<o:p /></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Size: 18x18cm<o:p /></span></p> <p class="MsoNormal"><span lang="EN-GB" style="font-family: Arial;">Pieces: 4, 6, 8 & 12<span> </span><o:p /></span></p> ```I wouldn't have expected those tags to cause a problem, and indeed, putting just that code in for a description on a test site causes no problems.

When you compare against the other products you quoted, it's worth noting that the markup is much different. For example, the first "editable" product link you mentioned contains a very simple description by comparison:```html
age 4+


Are you using an HTML editor in your admin area, or do you have your editor preference set to "none" ?
1 Aug 2007, 12:48 AM
#12
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

Sorry to nudge you but any thoughts on this issue?

What puzzels me is how the page can redirect when the page is not running only for certain items even if the code is termianted on line one.

If I could work this out I can debug as normal to work out the problem - could it be a .htaccess or something?

1 Aug 2007, 4:59 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

I have no idea what's causing it.

Try editing the /admin/includes/modules/product/preview_info.php and insert a die('HERE'); command somewhere.

Then edit one of your problematic products.
You should get a blank page with "HERE" on it.

Then edit the file and move the DIE command further down.

repeat until you find out at what stage/line the redirect happens.

That might tell you what kind of displayed data is causing it.

1 Aug 2007, 11:32 AM
#14
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

I have no idea what's causing it.

Try editing the /admin/includes/modules/product/preview_info.php and insert a die('HERE'); command somewhere.

Then edit one of your problematic products.
You should get a blank page with "HERE" on it.

Then edit the file and move the DIE command further down.

repeat until you find out at what stage/line the redirect happens.

That might tell you what kind of displayed data is causing it.

This is exactly what I want to do but as per above even if I put the die on the very first line it still redirects to the homepage.

However I have checked in the page and the form action URL is fine before the send (and I can see in the status bar that it is redirecting)

This is the bit I cannot get my head round and I am stuck. If I could terminate before the redirect or see where the redirect occures then I could trace the problem and work this out.

I have tried rebuilding the DB totally in a new database to see if its something to do with that

1 Aug 2007, 11:41 AM
#15
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

I suppose the /admin/product.php file would be another place to use the same technique.
You mentioned that file earlier. I'm not sure how much debugging you did in it, esp line-by-line.

1 Aug 2007, 12:44 PM
#16
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

I suppose the /admin/product.php file would be another place to use the same technique.
You mentioned that file earlier. I'm not sure how much debugging you did in it, esp line-by-line.

actually this is where I started - on line one of product.php I terminated with a die statement but it made no difference to the redirecting.

This is the thing - it must be the server causing the redirect rather then a script but how!! I have checked the configuationf or admin settings and cannot see any reason for this.

This is why this problem is so strange

1 Aug 2007, 6:40 PM
#17
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

What's in your /.htaccess and /admin/.htaccess files ?
Is there anything in your server's errorlog when this happens?

2 Aug 2007, 12:40 PM
#18
exceedit avatar

exceedit

New Zenner

Join Date:
Jul 2007
Posts:
11
Plugin Contributions:
0

Re: Strange problem with zen cart - Admin preview problems after Access db load

DrByte:

What's in your /.htaccess and /admin/.htaccess files ?
Is there anything in your server's errorlog when this happens?

I dont think there is a .htaccess but if there is I dont know how to access it. It doesnt show on my FTP program (i know from previous work that they dont) so not sure how to check. Any ideas?

Thanks

Shalom

2 Aug 2007, 8:02 PM
#19
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

Most FTP programs have an option to either filter by certain filenames, so entering .htaccess in the filter window will usually reveal the files; or else they have a setting somewhere to hide/show "hidden" files (ie: those that start with a . )

2 Aug 2007, 8:07 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Strange problem with zen cart - Admin preview problems after Access db load

This is a lengthy process, but it's where I'd recommend checking things out ... it may or may not reveal anything. It'd be good if you are able to include your .htaccess files in your download.
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues