FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Need help with debugging
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Need help with debugging [message #33817] Fri, 22 September 2006 17:04 Go to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
I have a problem wit the template editor and the message editor. When I click on the according links in the Admin Control Panel I get redirected to the index page. How can I find out why FUDforum does this?

P.S. At the moment I think that this behaviour is caused by one of mine code changes.
Re: Need help with debugging [message #33828 is a reply to message #33817] Fri, 22 September 2006 20:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   United States
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, the first step would be to add var_dump() to dump the input parameters to ensure that the correct data is present.

Then try do the same in functions responsible for loading the actual data.


FUDforum Core Developer
Re: Need help with debugging [message #33901 is a reply to message #33817] Mon, 25 September 2006 20:15 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
OK, I found the problem. I changed __adm_rsidl in adm.inc so that it contains encoded ampersands. This works fine on all pages of the Admin Control Panel but tmpllist.php and msglist.php.
Actually that's bad since it would have been a quite easy way for fixing some HTML errors within the Admin Control Panel...
Re: Need help with debugging [message #33913 is a reply to message #33817] Tue, 26 September 2006 20:56 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
I thought about an alternative and I have only found two:
1) adding a second __adm_rsidl with unencoded ampersand and using it within tmpllist.php and msglist.php
2) use an encoding function on every place where __adm_rsidl appears

At the moment I would prefer number 1) but I don't know whether there is a better solution. Can you tell me your opinion on this, Ilia?
Re: Need help with debugging [message #33926 is a reply to message #33913] Wed, 27 September 2006 23:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I'd say add another constant within the 2 pages that need it.

FUDforum Core Developer
Re: Need help with debugging [message #35092 is a reply to message #33817] Wed, 06 December 2006 20:05 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Now I have the time to get back on this.

When I use __adm_rsidl with encoded ampersand the two pages doesn't work. I have found out in the mean time that header() doesn't like encoded ampersands. The problem now is that even if I make an additionally __adm_rsidl without encoded ampersand for the both pages I get to front page when I click on "Edit". It only works when I don't change __adm_rsidl at all. This doesn't make sense to me, I hope you can help me finding the problem.
Re: Need help with debugging [message #35099 is a reply to message #35092] Thu, 07 December 2006 18:14 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The & can only be used in URLs shown in HTML code to the browser. You need the un-encoded version for header("Location");. This is why there are 2 constants _rsid and _rsidl, the former for HTML and the latter for redirect links.

FUDforum Core Developer
Re: Need help with debugging [message #35101 is a reply to message #33817] Thu, 07 December 2006 19:12 Go to previous messageGo to next message
JanRei is currently offline  JanRei   Germany
Messages: 361
Registered: October 2005
Location: Germany
Karma: 0
Senior Member
Contributing Core Developer
Translator
Do you mean that there is already a constant with &? I couldn't find one in adm.inc.
Re: Need help with debugging [message #35106 is a reply to message #35101] Fri, 08 December 2006 15:06 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The _rsid constants are made in user.inc.t, not adm.inc (in include dir)

only does

<?php
define
('__adm_rsidl'_rsidl.'&SQ='.$GLOBALS['sq']);
?>


Because that all it uses. If you adm copy of "_rsid" you'd need to define it yourself in a similar manner.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to merge two forums?
Next Topic: Import msgs from vBulletin 3.5.x
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 13:09:56 GMT 2024

Total time taken to generate the page: 0.01989 seconds