Jump to content

No access to dashboard after upgrade


Recommended Posts

Hi.  So I thought I would upgrade to the latest V6.06 from V6.05 this morning.  I did this through admin, and all seemed to go well.  But then I was asked to check the configurations for my admin page and my store page.  Both links went to my store home page rather than one to my admin page and the other to my store home page.  When I type the link that my admin used to be at, I get redirected to my home page.  I can access my admin via a bookmark, but it is not my renamed admin, although all my product etc does appear to be there.  Also once I am in admin, it does not allow me to go to dashboard, but again takes me to my store homepage.  What happened?  Where to I change this?  My includes/global.inc.php file is listing everything correct, but why can I not log in to my admin via my usual renamed admin file.  I have everything backed up, but is seems I am missing something simple.  Suggestions please.

Link to comment
Share on other sites

I don't think it was because of an issue.  I remember the same page appearing after the last upgrade.  It is basically a page showing the upgrade is 100% done, and the links to admin and homepage.  The upgrade I did before took me to my admin once I clicked the admin link.  This time they both take me to my home page.   I could probably restore from backup.  until later.  Thanks for you help so far Dirty Butter.

Link to comment
Share on other sites

I renamed my admin file back when I had V6.04.   And after the update from 6.04 to 6.05 everything was still where it was meant to be.( no problems at all)  When I say I can access admin from bookmark I really mean history in the address bar.   ie...https:// mysite.com/admin.php?_=g filemanager  takes me to file manager in what appears to be my admin . All my products etc are there.  I can move around in the admin everywhere apart from when I attempt to go to dashboard.  Then it takes me to my store homepage.  If I log out from admin, I get my admin login page, but when I attempt to log in it again takes me to my homepage.  I am not sure what is going on.

Link to comment
Share on other sites

Ok, we have narrowed it down to a problem where CubeCart 302 Redirects when attempting to show the Dashboard. And only the Dashboard. Which is what the admin is first shown after logging in.

Having a place to go after logging in that is not the default location (the Dashboard) tells us a lot. So we just to find what it is about the Dashboard that faults out using a 302 Redirect, either to a page that doesn't exist (a hard-coded redirect to admin.php), or an empty URL (which is as if www.mystore.com/<nothing here, so index.php>.

Does your hosting account have PHP's error logging turned on?

Link to comment
Share on other sites

Create a file named ini-custom.inc.php and save it in CubeCart's main folder. The contents are:

<?php
# Custom initialization commands
# Filename: ini-custom.inc.php
# File location: main CubeCart folder

ini_set('memory_limit', '256M');
ini_set('max_execution_time', '60');
ini_set('error_log', 'error_log');
ini_set('log_errors', 'on');

?>

When you get bounced to the storefront out of admin, see if there is a new file, 'error_log', in the CubeCart's main folder. If so, let us know the contents.

Link to comment
Share on other sites

ok.. found error log.

 

This is error being shown:

[24-Jun-2015 08:24:56 Australia/Brisbane] PHP Parse error:  syntax error, unexpected '$_smarty_tpl' (T_VARIABLE) in /home/knick830/public_html/cache/skin/7918baa6a1c892842db0458ffac62c541559ec0f_0.file.dashboard.index.php.php on line 103

Link to comment
Share on other sites

this is what happened before the above error showed (loads of times)

 

[24-Jun-2015 05:41:39 Australia/Brisbane] PHP Warning:  filesize() [<a href='http://docs.php.net/manual/en/function.filesize.php'>function.filesize.php</a>]: stat failed for /home/knick830/public_html/cache/fccb1.sql.9256b4f503277cd95351ca80748b8ac2.cache in /home/knick830/public_html/classes/cache/file.class.php on line 168
[24-Jun-2015 08:16:34 Australia/Brisbane] PHP Warning:  fread() [<a href='http://docs.php.net/manual/en/function.fread.php'>function.fread.php</a>]: Length parameter must be greater than 0 in /home/knick830/public_html/ADMIN NAME/sources/maintenance.index.inc.php on line 237
[24-Jun-2015 08:18:14 Australia/Brisbane] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 186884643 bytes) in /home/knick830/public_html/ADMIN NAME/sources/maintenance.index.inc.php on line 237

Link to comment
Share on other sites

Just did what you suggested bsmithers, and got the  same error I previously mentioned.  [24-Jun-2015 13:00:42 Australia/Brisbane] PHP Parse error:  syntax error, unexpected '$_smarty_tpl' (T_VARIABLE) in /home/knick830/public_html/cache/skin/7918baa6a1c892842db0458ffac62c541559ec0f_0.file.dashboard.index.php.php on line 103

Edited by ozzyizzy
error
Link to comment
Share on other sites

ok.. So I deleted all the files in /cache/skins.  Still not getting anywhere.  When I access my admin through history and attempt to go to dashboard, still directed to homepage.  All the files I deleted are back again.  This is what line 103  shows:

$foreach_$_smarty_tpl->tpl_vars['task']->value_Sav = $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['task']->value];

 

 

 

Link to comment
Share on other sites

Hm. I don't know if a dollar sign is a legal character in the name of a variable, other than being the character that marks a sequence of letters as starting a variable.

There is a change in the template code at exactly where this line is derived from.

So, let's try this experiment. In the admin skin template file dashboard.index.php, near line 42:

Find:
{foreach from=$CUSTOM_QUICK_TASKS key=k item=task}

Change to:
{foreach $CUSTOM_QUICK_TASKS as $k => $task}

This, $foreach_$_smarty_tpl->tpl_vars['task']->value_Sav, is new from other rendered templates in the cache folder. It may be a new aspect of the new version of Smarty being used in CC606.

After making the above edit, delete all the files in the /cache/skins/ folder again. Try to view the Dashboard.

Link to comment
Share on other sites

It sounds like your admin skin files haven't updated. Please either;

1. Download 6.0.6 and upload the admin folder over your existing files.

2. Implement the change in the top file of this commit (admin/skins/default/templates/dashboard.index.php): https://github.com/cubecart/v6/commit/84feb2d562471c9e69af323154e1b2c5aa3c2105

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...