Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Slider with admin configuration - admin logout / session issue


Recommended Posts

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!




Robert Whitis

Link to comment
Share on other sites

The person who wrote this needs to attend an osC 101 class.



My guess would be this code in /admin/includes/boxes/configuration.php


'code' => 'Slider Conf',
'title' => 'Slider',
'link' => 'slider.php'


Try this instead:


'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.

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

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">

Link to comment
Share on other sites

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 />';

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...