OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Redirect with anchor doesn't work in IE

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Redirect with anchor doesn't work in IE

Postby edithlin » Fri May 09, 2008 2:40 am

Hi

I've encountered the captioned problem previously and want to share a solution here.

Problem: try to add anchor parameter when calling Request::redirect but IE can't recognize the anchor (and trimmed).

Solution: update redirectUrl function in Request.inc.php as below:
function redirectUrl($url) {
if (HookRegistry::call('Request::redirect', array(&$url))) {
return;
}

//header("Location: $url");
header("Refresh: 0; url=$url");
exit();
}

James, if you find any problems on changing this, please feel free to alert me.

Cheers

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Redirect with anchor doesn't work in IE

Postby smiri » Sat May 10, 2008 6:00 pm

Hi Edith,

I tested the redirect function and it is working fine using IE 6, IE 7, Firefox and Safari. Can you give us more details on what you were trying to do that failed?

Thanks,
Siavash
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Redirect with anchor doesn't work in IE

Postby edithlin » Mon May 12, 2008 8:02 pm

Hi Siavash,

I added an anchor parameter 'reviewSteps' as below to focus a reviewer to the Review Steps section:
Request::redirect(null, null, null, 'submission', $reviewId, null, 'reviewSteps');

However, IE doesn't set the focus and just remains at the top of the page. I then found that IE just trims off '#reviewSteps' from the URL.

My broswer is IE6 but I didn't test other IE version.

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Redirect with anchor doesn't work in IE

Postby smiri » Mon May 12, 2008 9:03 pm

Hi Edith,

Can you see if you can access any other page that uses an anchor? I've tested this on an older machine and IE6 is handling anchors just fine.

try this link in your browser: http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=3104#p11255

You could also try to access your reviewSteps page with the anchor directly and not via the redirect function.

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Redirect with anchor doesn't work in IE

Postby edithlin » Tue May 13, 2008 8:05 pm

Hi Siavash

A normal anchor link works fine in my browser. However, my link is something like this:

http://myhost/conference/index.php/test ... bmission/1#reviewSteps

After a reviewer clicking on the 'Will do the review' button and sending out the email to the Track Director, the system goes back to the top of Abstract Review page. How to move the focus down to the review steps section with the anchor directly and not via the redirect function? Could you show me in details?

I can't think of any other ways and thus I updated the confirmReview function in SubmissionReviewHandler.inc.php by adding an anchor parameter (as shown in my pervious reply).

Thanks

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Redirect with anchor doesn't work in IE

Postby edithlin » Sun May 18, 2008 7:14 pm

Hi Siavash

Sorry not to have responded sooner to my reply.

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Redirect with anchor doesn't work in IE

Postby asmecher » Mon May 19, 2008 9:36 pm

Hi Edith,

Where did you modify the redirect call to add the new anchor parameter, i.e. what function in what file?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Redirect with anchor doesn't work in IE

Postby edithlin » Tue May 20, 2008 12:16 am

Hi Alec

I've updated the confirmReview function in pages\reviewer\SubmissionReviewHandler.inc.php,
from
Request::redirect(null, null, null, 'submission', $reviewId);
to
Request::redirect(null, null, null, 'submission', $reviewId, null, 'reviewSteps');

And of course, I've added <a name="reviewSteps"></a> to the templates\reviewer\submission.tpl file.

Thanks

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Redirect with anchor doesn't work in IE

Postby smiri » Thu May 22, 2008 6:39 pm

Hi Edith,

I have used your code below and confirmed that this is a bug. I've filed a bugzilla entry for it as well:
http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3520

For the time being, I would suggest you go on with your work-around for this bug until it's resolved.

Thanks,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Redirect with anchor doesn't work in IE

Postby edithlin » Tue May 27, 2008 9:59 pm

Thanks for your information.
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am


Return to OCS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest