The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
When redirect, GET value disappeared - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: When redirect, GET value disappeared (/showthread.php?tid=463)



When redirect, GET value disappeared - Whaxion - 02-19-2017

When UserSpice redirect from users/ to usersc/, all GET data is removed.

Is it possible to fix it ?

- Whaxion


When redirect, GET value disappeared - mudmin - 02-19-2017

Actually, I could see where that would be really handy. Let me think through that problem. I'm doing an update on Monday, so I will hopefully have an answer then.



When redirect, GET value disappeared - Whaxion - 02-19-2017

Okay, thanks you Smile


When redirect, GET value disappeared - mudmin - 02-19-2017

Try replacing your users/includes/header.php with this one and see if it works as you'd want it to.
http://pastebin.com/JEerxWbW

There is an extra r=1 in there, just to let you know you were redirected there.




When redirect, GET value disappeared - Whaxion - 02-19-2017

Thanks, you ! It's works ! But if we already have the r=1, another r=1 is added (Idk if this sentence is comprehensible because I'm not native English :/)


When redirect, GET value disappeared - mudmin - 02-19-2017

Well, yeah. I just made that as a temporary fix.

I am working on a more elegant solution.


When redirect, GET value disappeared - Whaxion - 02-19-2017

Ah okay x) Thanks you Smile


When redirect, GET value disappeared - mudmin - 02-19-2017

It doesn't seem to have a problem if you have a & in front of the first get variable, so this works too...
if(file_exists($abs_us_root.$us_url_root.'usersc/'.$currentPage)){
if(currentFolder()!= 'usersc'){
$url = $us_url_root.'usersc/'.$currentPage;
if(isset($_GET)){
$url .= '?'; //add initial ?
foreach ($_GET as $key=>$value){
$url .= '&'.$key.'='.$value;
}
}
}
Redirect::to($url);
}


When redirect, GET value disappeared - Whaxion - 02-19-2017

Okay, thanks a lot Smile