MyBB Community Forums

Full Version: Found a bug: When create a new help doc, the "clear cookies" link is broken.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
HEY GUYS IT ME AGAIN  Big Grin Big Grin Big Grin Big Grin

Im getting annoying? Sorry for that...

It' because i found another bug in My 1.8.7.

So, lets do this:

Bla bla, im customizing my Forum, bla bla, creating new help docs, bla bla

When i create a new help doc to show the cookie info, i put the link like this:

<a href="misc.php?action=clearcookies&amp;my_post_key={1}">here</a>

Right?

But, when i click in the link in the new cookie help doc... The Forum returns a error message like the key is wrong or something like that.

The original doc link replace {1} with a very ugly security number, ok, but the new doc dont "process" the "{1} key"

Im telling this right? I dont know "tech language", sorry guys.

Thanks for the attention Big Grin
Hi there,

I can confirm that this issue exists. I'm unsure as to why it does, but I'll continue looking through the code to see if I can figure out what that is.
Update: I've found out why this occurs. The replacement for the post code was done in a way that hardcoded the document id and only replaces the {1} if hid (help document ID) is equal to 3 (which it is in a stock install).

To make it work for a different document (like your own), you can modify ./misc.php around line 414 (link) and change the 3 to whatever your new document ID is.

To get your new document ID, simply browse to the document on the forum, and note the "hid" value in the URL.

For example, if your new document ID ("hid") is 20, then we can change:
./misc.php L414
if($helpdoc['hid'] == 3)
to
if($helpdoc['hid'] == 20)
Can this be pushed as a bug then?
Thanks for the reply guys.

Another solution that i found for my case is a easy one, is to translate just the cookies help doc in the lang pack.

It worked nice, for users who have translations installed in their system. In english forums, if you guys need to custom the help docs, you can modify the original eng file in ACP too.

Just a tip Smile

Bye, see you guys in the next bug.
(2016-05-14, 07:59 PM)Ben C Wrote: [ -> ]Can this be pushed as a bug then?
Well, {1} is a generic placeholder. It isn't supposed to work in other help docs.
(2016-05-16, 07:42 PM)StefanT Wrote: [ -> ]
(2016-05-14, 07:59 PM)Ben C Wrote: [ -> ]Can this be pushed as a bug then?
Well, {1} is a generic placeholder. It isn't supposed to work in other help docs.
So this is not a bug, right! If yes then move from 1.8 Bugs and Issues
Suggestion: Its not better if you guys create a 'universal link' for clearing the cookies?

My crappy 'solution' works too.

And another bug here: http://community.mybb.com/thread-192518.html
Definitely not a bug since that link wasn't supposed to be used outside that specific doc. If anything, we can make it available to all docs, but I don't think it's important - I'd reject this.
I'm also intrigued to as why we don't add a "universal link" for clearing cookies.
Pages: 1 2