Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-22 20:27:19

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Collapse expand forum

I seem to be having an odd experience, but then I have them all the time so why moan. Anyway this specific one is to do with the “International Users” forum. I usually have it collapsed but I’m finding at the moment that when I log in it is expanded already, like it hasn’t remembered my setting. Also, if I move from the index into another forum, then use my browser’s “back-arrow” to get back to the index, the IU forum has expanded again yet still shows the “expand” text next to it. If I click the “expand” text it collapses but shows the “collapse” text next to it. If I navigate back to the index using the breadcrumb all seems fine. Any ideas or is it just me?

Last edited by thebombsite (2008-07-22 20:28:57)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2008-07-22 21:54:20

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Collapse expand forum

I can confirm this. It’s not only the IU forum, but all collapsible forums. Happens both in Firefox/Linux and Konqueror.

Offline

#3 2008-07-22 22:19:07

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Collapse expand forum

Well spotted Els. I didn’t check the others as it is only the IU forum that I maintain collapsed. I’m on FF 3.0.1 Win.

Last edited by thebombsite (2008-07-22 22:21:12)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-07-22 23:06:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Collapse expand forum

I can’t replicate these problems, myself (FF 3.0.1 Win).

…like it hasn’t remembered my setting…

It’s cookie based (expires after a month, it looks like). The cookie’s name is txp-collapse. Is it there and if so, what are it’s contents?

The second problem makes sense if you’re having cookie problems.

Offline

#5 2008-07-22 23:40:25

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Collapse expand forum

So I visit the forum index page (FF 2.0.0.16/Ubuntu), all three forums Assistance, Community and International Users are expanded, I collapse them all, click Official Announcements, use FF’s back arrow, and all three are expanded, but show ‘expand’ next to their names.

Then I refresh the index page, the three forums are collapsed and show ‘expand’. OK. I expand them, visit Forum and Website, go back, and it’s the other way around:

This is the cookie:

Name    txp-collapse
Value	
Host	forum.textpattern.com
Path	/
Secure	No
Expires	Thu, 21 Aug 2008 23:37:40 GMT

Last edited by els (2008-07-22 23:41:38)

Offline

#6 2008-07-22 23:45:01

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Collapse expand forum

Cookie ain’t filled, there’s the problem.

It doesn’t look like the forum markup or JS has been changed. ?

Offline

#7 2008-07-22 23:54:42

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Collapse expand forum

Mary wrote:

Cookie ain’t filled, there’s the problem.

And is that a local/browser problem? Because you don’t have it, and Stuart and I do. On the other side, it doesn’t look browser related since it happens in two different browsers…?
Don’t know if this helps, but I see two other cookies from textpattern.com, __utma and punbb_cookie, that do have values.

Edit: the cookie’s value is sometimes 4, and sometimes empty. Other values I haven’t seen yet.

Last edited by els (2008-07-23 00:10:52)

Offline

#8 2008-07-23 22:04:35

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Collapse expand forum

Mary wrote:

Cookie ain’t filled, there’s the problem.

Nope, it ain’t, not for me. For me it’s javascript plus cookie problem, but the cookie alone works fine.

  • Array of collapsed areas are inserted as should in the cookies value
  • But if I hit “go history back”, then the javascript doesn’t look at the cookie at all, like it’s ingnoring it.
  • Browsers: last stable Fx2.x and latest stable Fx3.x on WinXP 32 SP2 (still hehe :D)

Offline

#9 2008-07-24 04:11:30

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Collapse expand forum

It is rather weird, but I couldn’t say where the problem lies. Maybe it’s the way the JS is written.

Edit: Yep it is…

Last edited by Mary (2008-07-24 04:50:08)

Offline

#10 2008-07-24 04:49:43

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Collapse expand forum

Aha. Figured it out.

When you load up the index the first time, all are visible and you’ve got no cookie. Then you decide, I don’t want to see this category all the time, let’s collapse it. You click the link, your cookie is created and JavaScript collapses the element. When you click on a link to return to the index, the server collapses the element. So when you click back, the cookie is there, but of course you’re loading from cache so the server is unable to do any collapsing for you.

A few ways to fix this:

  • don’t let the the index be cached (it’s own downside)
  • swap the collapsing to use JavaScript (depending on your connection there could be a delay before the collapsing is done)
  • use both server-side and client-side collapsing, probably have the server set a flag when it has done the work, so no redundant JS is run (there would still be a delay before the collapsing is done, but limited to when you hit the back button)

Last edited by Mary (2008-07-24 04:53:39)

Offline

#11 2008-07-31 21:00:20

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Collapse expand forum

OK. I sort of understood that but is it something that needs setting on the forum or do I have to set something in my browser and if so, what?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2008-07-31 21:51:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Collapse expand forum

I was going to ask the same question but was afraid it might be a dumb one ;)

Offline

Board footer

Powered by FluxBB