robertwhitis Posted March 27, 2013 Share Posted March 27, 2013 I'm running v2.3.3. I downloaded this contribution: http://addons.oscommerce.com/info/8727 I've followed all of the instructions properly. Okay, so here is where it all falls apart. I'm browsing the admin section, and decide to visit the "Sliders" admin area under "Configuration"... When I click on "Sliders", I am logged out, and a new session ID is generated (login.php?osCAdminID=<new session id here>) When I log back in, I land on the "Sliders" admin panel (with same session ID shown on login page). If I then try to upload a slider, I'm logged out, and a new session ID is generated (shown on the login page). So there you have it - when I try to navigate to the slider settings page, I'm logged out, and when I try to upload an image, I'm logged out. I have no other issues with this happening anywhere else on the store or any other session issues. My store is running perfectly fine. I installed this addon, and this issue only arises when accessing or using the particular admin panel for the addon. Any help would be appreciated! Cordially, Robert Whitis Quote Link to comment Share on other sites More sharing options...
germ Posted March 27, 2013 Share Posted March 27, 2013 The person who wrote this needs to attend an osC 101 class. :huh: My guess would be this code in /admin/includes/boxes/configuration.php array( 'code' => 'Slider Conf', 'title' => 'Slider', 'link' => 'slider.php' ) Try this instead: array( 'code' => 'Slider Conf', 'title' => 'Slider', 'link' => tep_href_link('slider.php') ) If you don't use the tep_href_link() function on anchors you stand a pretty good chance of losing the session. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
robertwhitis Posted March 28, 2013 Author Share Posted March 28, 2013 (edited) Thanks germ, that seems to have affected it somewhat, however, it is still logging me out when I attempt an image upload. Edited March 28, 2013 by robertwhitis Quote Link to comment Share on other sites More sharing options...
robertwhitis Posted March 28, 2013 Author Share Posted March 28, 2013 The fix that germ listed is necessary, however, also in the file /admin/slider.php, you need to use tep_href_link for slider.php in the form action element as follows: <form action="<?php echo tep_href_link('slider.php'); ?>" method="post" enctype="multipart/form-data"> Quote Link to comment Share on other sites More sharing options...
robertwhitis Posted March 28, 2013 Author Share Posted March 28, 2013 Also, in the /admin/slider.php file, you need to edit the action URL for the delete forms as well (or you'll be logged out when you try to delete an image) as follows: echo '<form action="'.tep_href_link('slider.php').'" method="post"><input type="hidden" name="deleted" value="true"><input type="hidden" name="id" value="'. $row["id"] . '"><input type="submit" value="Delete"></form><br />'; Quote Link to comment Share on other sites More sharing options...
alinisme Posted March 29, 2013 Share Posted March 29, 2013 Owh well, sorry for that. It works perfectly fine with v2.2. I'll update this right away. Thanks for pointing it out. 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.