Zen Cart Logo
Forums / General Questions / Admin will not display. Error. unable to determine the page link

Admin will not display. Error. unable to determine the page link

Views: 4,178

Results 1 to 16 of 16
13 Nov 2012, 6:05 AM
#1
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Admin will not display. Error. unable to determine the page link

I was working in my admin control panel and was toggling off my Ultimate URL's, so that I could get an internal URL link for one of my ez-pages. I was After I toggled off Ultimate URL's I got this error in my admin control panel:

[B]Error!

Unable to determine the page link![/B]

Obviously this is from the internal page link, that was entered in one of my ez-pages, and my database does not seem to like it.

Nothing else shows in the admin panel not even one link. Just this text, Zen Cart Admin Log, Check for Updates, and the green bars (but with no links). I don't see what I did wrong. I can't access my admin now. Any way to clear this issue out?

13 Nov 2012, 6:21 AM
#2
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

I don't really know how to debug, but I went to: shop/logs and found the last few files. They say this:

[12-Nov-2012 23:51:46] PHP Warning:  htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /MYROOT/public_html/SHOP/MYADMIN/ezpages.php on line 431

I downloaded this file and on line 431 it has this coding:

<td class="main"><?php echo zen_draw_textarea_field('pages_html_text', 'soft', '100%', '40', htmlspecialchars($ezInfo->pages_html_text, ENT_COMPAT, CHARSET, TRUE));?></td>

I got this error immediately after I turned off ultimate URL's. This database did come from a different installation v1.3.9f and was upgraded. It seemed to be running fine.

13 Nov 2012, 7:06 AM
#3
kobra avatar

kobra

Black Belt

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

Re: Admin will not display. Error. unable to determine the page link

On your page
/index.php?main_page=page&id=23

It might be due to UTF8 conversion as I see these
I can’t
store…sexy
it’s comfy “

Might edit these pages and use html escape characters for special text and see if that fixes it
http://www.w3schools.com/tags/ref_entities.asp

13 Nov 2012, 1:32 PM
#4
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

You were right about the URL. I think I was updating my Gift Certificate page and the URL was like this: index.php?main_page=index&cPath=21. The page was originally created in my other installation (and it still runs fine there, but that installation is v1.3.9f and does not use Ultimate URL's). But I notice on my new ezpages some of them are blank (the text inside the ez-pages did not come over).

My admin has no links. This is what I have (see image below):

So I am not able to edit any pages from inside my admin or make any changes. How can I gain access to the admin panel again? Do I have to do something in phpmyadmin? Or change the coding in the /MYADMIN/ezpages.php.

13 Nov 2012, 4:24 PM
#5
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

I have been going through the MYADMIN/logs and there are plenty of them. The logs looked fine (well some minor issues) until one really big file. I checked many of the files before and they seemed to be running properly. Then this big file, then many files with the same type of error. Let me explain.

Here is the firs log file, with the first hint something went wrong:

This is the last file in the debug:

[12-Nov-2012 04:19:41] PHP Fatal error:  1062:Duplicate entry 'zc_d6616cb5f4c2cb55d422ea67feb723b0' for key 'PRIMARY' :: insert into db_cache set cache_entry_name = 'zc_d6616cb5f4c2cb55d422ea67feb723b0',
                                                 cache_data = 'YTo4NjQ6e2k6MDthOjI6e3M6NjoiY2Zna2V5IjtzOjEwOiJTVE9SRV9OQU1FIjtzOjg6ImNmZ3ZhbHVlIjtzOjEzOiJMYSBTaWxob3VldHRlIjt9aToxO2E6Mjp7czo2OiJjZmdrZXkiO3M6MTE6IlNUT1JFX09XTkVSIjtzOjg6ImNmZ3ZhbHVlIjtzOjU6IkJyaXR0Ijt9aToyO2E6Mjp7czo2OiJjZmdrZXk
Lots and Lots of Cache Characters......
fU1RFUFMiO3M6ODoiY2ZndmFsdWUiO3M6NToiMTIsMjQiO319',
                   cache_entry_created = '1352715581' in /MYROOT/public_html/SHOP/includes/classes/db/mysql/query_factory.php on line 120

There is a lot of cache characters, I hid most of them for display purposes (97.6KB). This seems to be showing the issue. I do not understand databases or cache but it seems like this was a cache issue (at least according to this debug file).

Then after this file I have many files that look like this:

[11-Nov-2012 20:47:08] PHP Warning:  htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /ROOT/public_html/store/MYADMIN/includes/DIFFERENT DIRECTORIES/DIFFERENTPAGES.php on DIFFERENT LINES

There are several of these pages, all with different directories and files (although they all seem to be in my admin folder).

I just don't know how to reverse this to get my admin running again!

13 Nov 2012, 5:12 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Admin will not display. Error. unable to determine the page link

Some background
I remember you mentioning you upgraded from Zen Cart 1.3 to Zen Cart 1.5. When you upgraded, did you start with a clean store (no plugins) and slowly add (only compatible) plugins one at a time?

When you removed your old URL re-writer (I remember you saying you had a different re-writer - not compatible with Zen Cart 1.5 installed) did you undo everything it changed (including any database changes)?

The error message you are getting
The db_cache table is used by Zen Cart to "cache" items (typically SQL Queries). It will be used if you enabled the setting in your configuration file "define('SQL_CACHE_METHOD', 'database');".

  1. Disable Zen Cart's cache "define('SQL_CACHE_METHOD', 'none');"
  2. Run a repair on the db_cache table using phpmyadmin or similar
  3. You can safely truncate this table without causing any major issues to clear out any stale or broken entries

You can now backup and use a tool such as db2utf8 or MySQL charset converter (beta). I have not used either tool so cannot comment on which to use. Once you have converted all your data to UTF8 you can turn Zen Cart's cache back on if desired.

13 Nov 2012, 6:24 PM
#7
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

OK. I am still seeing the error in the admin panel. This is what I have done:

  1. Disable Zen Cart's cache "define('SQL_CACHE_METHOD', 'none');"
  1. Run a repair on the db_cache table using phpmyadmin or similar
  1. You can safely truncate this table without causing any major issues to clear out any stale or broken entries
  1. Yes. In both includes/configure.php and in admin/includes/configure.php I changed to none and re-uploaded
  2. Yes, I both repaired and optimized via phpMyAdmin
  3. I emptied the db_cache >cache_data in phpMyAdmin, but I did not delete the 3 items located under db_cache (cache-entry_name, cache_data, or cache_entry_created). Can I remove these 3 sub-tables? Should I just delete the db_cache itself (and it's childredn), or just completely empty all 3 of these children?
  4. I cleaned the cache in my browser and then logged back into my control panel and the same thing still shows.

I remember you mentioning you upgraded from Zen Cart 1.3 to Zen Cart 1.5. When you upgraded, did you start with a clean store (no plugins) and slowly add (only compatible) plugins one at a time?

I uploaded brand new store, downloaded old database after cleaning and optimizing, then installed and upgraded the old, clean database in new install v1.5.1 cart. During upgrade there were a few files that could not be upgraded due to older plugins. The list of upgrade issues can be found here: http://www.zen-cart.com/showthread.php?201738-upgrading-live-store-with-several-changes&p=1162051#post1162051.

Then I went through one by one and added newer versions of plugins. In some cases ran the uninstall.sql for older add-on versions to remove them from the database for the new installation. Several of the older plugins versions did not even have an uninstall.sql. While my store does not carry these files (since this is a clean install) I am sure some of these database entries could still be there.

When you removed your old URL re-writer (I remember you saying you had a different re-writer - not compatible with Zen Cart 1.5 installed) did you undo everything it changed (including any database changes)?

Simple SEO URL's v1.3.8 did not have an included uninstall.sql, so I did not remove it from my old database. This could of course be the problem. Nor is there an install.sql included. Unless it installs itself (which I never found the configuration file in the admin like older versions). It's possible it never installed in the new cart (although it was installed in the old cart and that database was imported and upgraded). I did re-upload all the files, and could not get it to work. Then I deleted all these files (no uninstall), and then installed Ultimate SEO's. So I just don't know.

I don't know if this matters, but my in my old store I did store cache in the database. But I have noticed that my database keeps getting larger as time goes on. So in an order to curb a store that keeps growing, I decided during this install to not store cache via the database. I remember checking now during upgrade (or install). Yet my config.php files had it as saving to db like this:

define('SQL_CACHE_METHOD', 'database');

I don't know when it changed back, must have been during the upgrade.

13 Nov 2012, 9:03 PM
#8
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Admin will not display. Error. unable to determine the page link

sports guy:

... Can I remove these ... Should I just delete the db_cache itself (and it's childredn), or just completely empty all 3 of these children? ...
Those are columns in the table. You do not want to delete any columns.

Are you getting any more errors "1062:Duplicate entry ... db_table"? Or are these now cleared up?

sports guy:

... OK. I am still seeing the error in the admin panel. ...
Take a gander at Should I convert my cart to UTF8. See if changing your cart back to the old character set fixes the htmlentities errors. You may be able to avoid updating all your data to UTF8 at this time if you do not need support for extended characters.

Are there any new items in the "error logs"?

sports guy:

... did not have an included uninstall.sql, so I did not remove it from my old database. ...
I think it adds some configuration items which should not be a big deal (other then using space in the database) and an extra table called "links_aliases". You will want to make sure you have a backup of "links_aliases" before you remove the table.

13 Nov 2012, 9:04 PM
#9
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

Let's see. The last action that I did was go to EZ Pages and edit the contact us page. I created this internal linked page in the old store, and was examining the internal URL specification. I wanted to see if it was the same for this store (since the page was added in the old store it carried over). So to see what the new URL would be (without Ultimate URL's installed) I then went to: admin>configuation>SEO URL> and disabled. (At least I think it's SEO URL I cannot see in my admin panel right now). Then right after disabling it, the admin went to the blank error version of the admin control panel.

My plan was to look at the URL on the front end and paste it into the contact page URL in the internal URL field, to make sure it pointed right. I did not get that far.

So is it possible to go directly to the database and enable Ultimate URL's and see if the admin comes back up?

Last, I don't know how the character conversion changed (utf8). I did not change the character; and this database came from the same exact server but in a different folder. So the database defaults should be the same. When I backed up the database I chose default. And when I installed and upgraded I chose default (like I have in the past). So it's beyond me as to why the conversion is not the same. Not unless the server admin upgraded the database since and changed the character conversion.

13 Nov 2012, 9:22 PM
#10
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

No that error is not repeating. I only had that error in one admin/log file earlier when the store first went out. The log files since all say this:

[12-Nov-2012 23:47:08] PHP Warning:  htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /MYROOT/public_html/store/MYDAMIN/ezpages.php on line 431

Remember in another post I had this entered under my Ultimate URL's: /=>and I wonder if this has something to do with this error. I am doing everything by memory as my access to this configuration area is blocked now.

13 Nov 2012, 9:31 PM
#11
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Admin will not display. Error. unable to determine the page link

sports guy:

... So is it possible to go directly to the database and enable Ultimate URL's and see if the admin comes back up? ...
Yes, you can run the following after changing the prefix if needed for your database table names.

UPDATE `configuration` SET `configuration_value` = 'true' WHERE `configuration_key` = 'SEO_ENABLED';

I am unable to duplicate the issue you are experiencing with Zen Cart 1.5.1 (PHP 5.2 - upgraded from Zen Cart 1.3.9h), Zen Cart 1.5.0 (PHP 5.3 - clean install), or Zen Cart 1.5.1 (PHP 5.4 - clean install). This tells me something with your data or installation is causing the issue. You may want to try to find the cause while the issue can be duplicated.

sports guy:

Last, I don't know how the character conversion changed (utf8). I did not change the character; and this database came from the same exact server but in a different folder. ...
Upgrading Zen Cart to 1.5 would do this. Zen Cart 1.5 by default uses UTF8 tables in the database. And in Zen Cart 1.5.1 the UTF8 character set is used for PHP functions which take a character set as a parameter.

The "htmlspecialchars()" problems are probably coming from this change. But these typically do not break the page from displaying in my experience.

13 Nov 2012, 10:22 PM
#12
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

On your last suggestion:

Take a gander at Should I convert my cart to UTF8. See if changing your cart back to the old character set fixes the htmlentities errors. You may be able to avoid updating all your data to UTF8 at this time if you do not need support for extended characters.

I converted per this article: http://www.zen-cart.com/content.php?313 and the admin page still shows the error. All english.php files were converted and both config.php files had this added: ```
define('DB_CHARSET', 'latin1');


I did get a new admin/log file, but it I keep getting the same error.
13 Nov 2012, 11:20 PM
#13
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

This may help. In PHPMyAdmin my database has 107 tables. The collation is different for each of the tables as it looks like a mixed bag.

On the bottom of all tables where it lists 107 in bold under collation is says: uft8_unicode_ci I am guessing this is default?

Almost all tables are listed as: latin1_sweedish_ci (99 tables)

These tables are listed as: utf8_unicode_ci

  • counter_history
  • links
  • links_description
  • seo_cache
  • subscribers (guessing left over from plugin)

These tables are listed as: utf_general_ci

  • admin_menus
  • admin_pages
  • admin_pages_to_profiles
  • admin_profiles

It seems as if my database has a variety of collation (maybe even from the first installation). Can these be changed by hand? If so what should all be changed too? Last, should any of these just be deleted? As some look like left-overs from plugins. I assume this has to be the problem. Especially the admin ones (I may have had an admin plugin at some time in the past, although I did not see it this time around).

13 Nov 2012, 11:23 PM
#14
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

Its the store admin is up for now! I ran the querie you sent me to enable the Ultimate URL's, and the store admin came back up!! So now I need to figure out how to make my database collations uniform.

14 Nov 2012, 12:53 AM
#15
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Admin will not display. Error. unable to determine the page link

sports guy:

This may help. In PHPMyAdmin my database has 107 tables. The collation is different for each of the tables as it looks like a mixed bag. ...
Yuck. My upgraded installation was initially the same way.

... Especially the admin ones (I may have had an admin plugin at some time in the past, although I did not see it this time around). ...Yup, that plugin went away as Zen Cart 1.5 includes authorization (admin profiles) by default. I'd guess you are right on why these are a different collation.

sports guy:

... uft8_unicode_ci I am guessing this is default? ...
I believe so (this is what my new sites are).

Hmmm, out of curiosity what are the "link" and "link_description" tables for? They look intriguing.

14 Nov 2012, 2:02 AM
#16
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Admin will not display. Error. unable to determine the page link

Hmmm, out of curiosity what are the "link" and "link_description" tables for? They look intriguing.

I had a link exchange plugin one time (for automated link exchanges). It did not have CAPTCHA so I abandoned it some time back, was getting lots of SPAM and was not effective. I believe that is what created these tables.

Recommendation: Should I change the english.php and config.php back to UTF8, then go into PHPMyAdmin and change each and every table to: utf8_unicode_ci. Or is it recommended to just stay where I am at with the latin. If I stay where I am at with Latin should I change then only change whole database to: latin1_sweedish_ci? It looks like I can do this by selecting the whole database>operations>collations>change to: latin1_sweedish_ci? Should I also change the other 9 UTF tables to this latin1_sweedish_ci or leave them be?