Jump to content
Latest News: (loading..)
robertwhitis

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!

 

Cordially,

 

Robert Whitis

Share this post


Link to post
Share on other sites

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.


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 >

Share this post


Link to post
Share on other sites

Thanks germ, that seems to have affected it somewhat, however, it is still logging me out when I attempt an image upload.

Edited by robertwhitis

Share this post


Link to post
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">

Share this post


Link to post
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 />';

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×