Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Can't get into the admin side: WARNING: An error occurred ...

    Sheesh, this must be the week for catastrophes. I tried to install the sql patches for the Pin-it Pinterest plugin and now I can't access the admin side from my primary active directory. But I can get into it from my test installation, which uses the same database.

    I've talked to DarkAngel on the support thread for that plugin, and it was suggested that I do the uninstall.sql patch multiple times from admin. I can only do that from the admin in my test site, and I'm really reluctant to do anything that might screw that one up too.

    Can anyone talk me through the order in which things load for the admin side so I can start to narrow the problem down? I can look at index.php for the customer side (which is working fine) and see the order in which files are loaded, but I don't see what's going on for the admin side.

    The error I'm getting is "WARNING: An Error occurred, please refresh the page and try again.' The url I'm seeing is
    https://www.newnaturalsonline.com/MY...from=index.php

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Can't get into the admin side

    Quote Originally Posted by HeleneWallis View Post
    The error I'm getting is "WARNING: An Error occurred, please refresh the page and try again.'


    Firstly take a look into the /logs folder. What are the DEBUG errors telling you? Please post them here.

    http://www.zen-cart.com/content.php?...-and-try-again

  3. #3
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Can't get into the admin side

    Well, now I feel good and stupid. Looking for the logs was one of the first things I did, but I was looking in the admin folder. Since I didn't see it there, I thought it must have been one of those things that could be turned on in the Configuration, and that I hadn't turned it on. But I did find the logs folder and this is what's happening:
    [27-Aug-2016 19:35:52 America/Denver] Request URI: /MYADMIN/stamps.php?username=Hele&password=6765_Arden&action=getmodule, IP address: 216.52.211.209
    #1 trigger_error() called at [/home1/darwinhi/public_html/newnaturalsonline/includes/classes/db/mysql/query_factory.php:167]
    #2 queryFactory->show_error() called at [/home1/darwinhi/public_html/newnaturalsonline/includes/classes/db/mysql/query_factory.php:139]
    #3 queryFactory->set_error() called at [/home1/darwinhi/public_html/newnaturalsonline/includes/classes/db/mysql/query_factory.php:266]
    #4 queryFactory->Execute() called at [/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/installers/pin_it_button/1_3_0.php:8]
    #5 include_once(/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/installers/pin_it_button/1_3_0.php) called at [/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/init_includes/init_pin_it_button_config.php:32]
    #6 require(/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/init_includes/init_pin_it_button_config.php) called at [/home1/darwinhi/public_html/newnaturalsonline/includes/autoload_func.php:48]
    #7 require(/home1/darwinhi/public_html/newnaturalsonline/includes/autoload_func.php) called at [/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/application_top.php:171]
    #8 require(/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/application_top.php) called at [/home1/darwinhi/public_html/newnaturalsonline/MYADMIN/stamps.php:279]

    [27-Aug-2016 19:35:52 America/Denver] PHP Fatal error: 1062: Duplicate entry 'PINTEREST_BUTTON_SHAPE' for key 'unq_config_key_zen' :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
    (NULL, 'Pinterest Button Shape', 'PINTEREST_BUTTON_SHAPE', 'Rectangular', 'Use the Rectangular or Circular icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'Rectangular\', \'Circular\'),'),
    (NULL, 'Pinterest Button Size', 'PINTEREST_BUTTON_SIZE', 'Large', 'Use the Large or Small icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'Large\', \'Small\'),'),
    (NULL, 'Pinterest Button Color', 'PINTEREST_BUTTON_COLOR', 'red', 'Use the red, gray, or white icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'red\', \'gray\', \'white\'),') ==> (as called by) /home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/installers/pin_it_button/1_3_0.php on line 8 <== in /home1/darwinhi/public_html/newnaturalsonline/includes/classes/db/mysql/query_factory.php on line 167
    Last edited by DrByte; 28 Aug 2016 at 02:52 AM. Reason: MYADMIN

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can't get into the admin side

    It would seem something's wrong with Numinix's installer for their Pinterest plugin: they're trying to install settings that are already there, instead of first checking for them and detecting that installation is already done.

    I guess you could hack their installer files out of your site so they don't cause further havoc ... but they might not have completed fully, leaving the mod only partially installed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Can't get into the admin side

    Not sure at this point if this is duplicate information for you or not. But if you take notice of the fatal error message:
    Code:
    [27-Aug-2016 19:35:52 America/Denver] PHP Fatal error: 1062: Duplicate entry 'PINTEREST_BUTTON_SHAPE' for key 'unq_config_key_zen' :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
    (NULL, 'Pinterest Button Shape', 'PINTEREST_BUTTON_SHAPE', 'Rectangular', 'Use the Rectangular or Circular icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'Rectangular\', \'Circular\'),'),
    (NULL, 'Pinterest Button Size', 'PINTEREST_BUTTON_SIZE', 'Large', 'Use the Large or Small icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'Large\', \'Small\'),'),
    (NULL, 'Pinterest Button Color', 'PINTEREST_BUTTON_COLOR', 'red', 'Use the red, gray, or white icon?', 34, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'red\', \'gray\', \'white\'),') ==> (as called by) /home1/darwinhi/public_html/newnaturalsonline/MYADMIN/includes/installers/pin_it_button/1_3_0.php on line 8 <== in /home1/darwinhi/public_html/newnaturalsonline/includes/classes/db/mysql/query_factory.php on line 167
    You see that it says that there is a duplicate entry: PINTEREST_BUTTON_SHAPE

    This is as DrByte was talking about where it is trying to install something that is already there in the database. Sure, could delete that one entry from the database, and then try to access the system again, but probably will error on the next line. Repeat the process, and may again error either on the first or third, etc... this leads back to the original suggestion of performing the uninstall sql which will/should remove all database entries and then allow the installer to add back the records as intended. The alternative as DrByte suggested is to modify the install file(s) so that the problem entries are removed one at a time until success... the later method would minimize the changes/loss of record numbers in the database, but could take longer, but also lead to identifying why there might have been a problem to begin with...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Can't get into the admin side

    Thanks, both of you. I just deleted ALL the Pinit-related files and everything appears to be okay. When I've confirmed that, I'll back up the database and then try running the uninstall patch.

    Would either of you like to recommend a PHP book? I see how the php commands are used to send html, but I need something more rigorous now than just looking things up on line every time I run into something I'm not familiar with. For example, I just spent about two hours playing with the heading on invoice.php so I can print just my logo and store information on my color printer, and then run those sheets through the laser printer to print the rest of the text, thereby saving ink on the inkjet. I've done it, but it took repeated online lookups to get the nl2br() function and the newlines correct (yes, dimwit, they do need to be surrounded by quotes).

    And is there a tree or something anywhere that indicates in what order files are loaded? I've been looking at index.php and puzzling it out myself, but if something is already available that would show all of it, that would save a lot of time. I need to get an overall picture in my mind of what's going on, not just the syntax but a sense of the style and organization that's typically used for php.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can't get into the admin side

    It's a little outdated, but the concepts are pretty much the same: Zen Cart Program Flow Documentation -- specific to the storefront-side, not the Admin (basically different in that the Admin prior to v160 doesn't use much in the way of any template system.)

    For the Admin, it loads whatever you put the the URL ... ie: invoice.php ... which in turn runs the admin application_top, which loads the initSystem, and then carries on with the code in your file, ie invoice.php.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Can't get into the admin side

    Thank you very much, I will have a look at that. Want to recommend a PHP book? I've ordered O'Reilly's PHP Cookbook, having had very good results with their other "cookbooks" in the past. But it's obviously not for the rank beginner.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can't get into the admin side

    If you like screencasts, this series covers the basics very well: https://laracasts.com/series/php-for-beginners
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Can't get into the admin side

    I do better with books--yes, I'm an old fogey. But I'll definitely check this out and thanks.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 22 Jul 2021, 02:44 PM
  2. v150 Admin Login Page Error, WARNING: An Error occurred
    By maperr55 in forum General Questions
    Replies: 5
    Last Post: 3 Jun 2016, 04:51 AM
  3. Setting Value Options i get: WARNING: An Error occurred, please refresh the page and
    By home2gifts in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 2 Jan 2013, 03:46 PM
  4. Replies: 3
    Last Post: 21 Dec 2012, 01:53 PM
  5. Replies: 4
    Last Post: 25 Jun 2009, 08:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR