AffordableDomainsCanada Posted July 9, 2016 Share Posted July 9, 2016 When someone is at /cart.php and they select a product, they get redirected to the domain selection page, after entering in a domain name, they are redirected to the page /cart.php?a=confproduct&i=0 this error appears.. Order Summary > An Error Occurred. Please Try Again. - - - Updated - - - Some times after selecting the domain it just gets redirected to cart.php ive deactivated and removed any 3rd party modules to see if something was causing this issue and no changes.. Still the same issue. I am going to try reuploading the core whmcs files. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 9, 2016 Share Posted July 9, 2016 I am going to try reuploading the core whmcs files. that would have been my first thought too. failing that, then you have to wonder if it could be an issue with the template, an errant hook - have you tried enabling errors and seeing if there are any record of the error in the logs ? 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 9, 2016 Author Share Posted July 9, 2016 that would have been my first thought too. failing that, then you have to wonder if it could be an issue with the template, an errant hook - have you tried enabling errors and seeing if there are any record of the error in the logs ? After a couple hours of playing around with files, ive found it to be 2 hook files causing the problem for some reason. The first one is removing a parent menu item. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('sms_center'))) { $primaryNavbar->removeChild('sms_center'); } }); Then im re adding this menu item as a child under the seconday nav > your account <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar) { if (!is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account') ->addChild('SMS Center', array( 'label' => 'SMS Center', 'uri' => 'index.php?m=sms_center', 'order' => '60', )); } }); Im guessing I need to have this as one file, instead of the 2 i am using now.?? Can you help me make this one file ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 10, 2016 Share Posted July 10, 2016 I'm guessing I need to have this as one file, instead of the 2 i am using now.?? Can you help me make this one file ? I can - but I doubt it would resolve the issue. those two hooks are accessing different navbars, so there shouldn't be any clash between them - certainly the second hook that adds a link to the secondary navbar shouldn't be causing this. but if you wanted them in one file, you would just do... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('sms_center'))) { $primaryNavbar->removeChild('sms_center'); } }); add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar) { if (!is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account') ->addChild('SMS Center', array( 'label' => 'SMS Center', 'uri' => 'index.php?m=sms_center', 'order' => '60',) ); } }); but as I say, I don't think it will make any difference. i'm wondering what is creating the "SMS Center" navbar link in the first place? I am assuming that it's the ModulesGarden SMS Center module? if it is, then perhaps the module is checking whether the navbar link exists, and because it doesn't, that's what's causing the error? what I would do is disable that first hook that removes the navbar link and see if that solves it - if it does, then you know the module is trying to detect the navbar link and you'll either have to leave the link where it is, or contact ModuleGarden about the module. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.