HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] Why do we need ?Keep_theme=??????? in URLs.

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#67743 (In Topic #14430)
Avatar

Community saint

Chris, the use of Keep_theme=??????? in URLs seem inconsistent and I'm wondering why/when exactly its needed (other them testing).

The only obvious place that I can find where it is used is in the poll "view all" link.

I want to avoid the possibility that theme names can get bookmarked in case I change it in the future.


Last edit: by temp1024

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#67744
Avatar

Community saint

In what instance are you getting the 'keep_theme'? I only get it when I type it in directly testing new themes I am creating. If I type it in wrong (the theme does not exist) it directs me to the default theme)

Name the theme you want people to see the same as the name of your website and it will default to that. eg. Your site name = your_site_name  for your default theme.
Back to the top
 
Posted
Rating:
#67745
Avatar

Community saint

Brian Hay said

In what instance are you getting the 'keep_theme'?
I get it with polls when I click on the vote button, view results link, view all link and view link. I haven't done a thorough check to find all instances on my site. I haven't even finalised exactly what modules I even want to use yet.

Brian Hay said

Name the theme you want people to see the same as the name of your website and it will default to that. eg.
That's exactly what I want to avoid. If there is a theme name in the URL and a user bookmarks the page then in the future when they use the bookmark they will either not see the current theme if I change it (because the URL has a perpetual reference to the old theme), or if I delete that theme when I cut them over to a new theme they will get an error message, which I don't want them to get.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#67746
Avatar

Community saint

No, I didn't explain myself well. If someone goes to &keep_theme=does_not_exist they won't get a 404 not found. They will see the page they are looking for with the default theme for your site. The default being ether ocPortal's own default theme or the them that is named the same as your website is named in you configuration if it exists.
Back to the top
 
Posted
Rating:
#67747
Avatar

Community saint

While they will not get a 404 error, they will get this:


And I do not want that to happen.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#67748
Avatar

Community saint

True and any error hurts. Even the most minor errors on my sites drive me nuts and I gotta fix them asap unless it is an error only I see. Then I fix them when I have nothing better to do.

Wish I had a better answer but I don't….can you give me a url here or pm that I can work with to trouble shoot for you?
Back to the top
 
Posted
Rating:
#67750
Avatar

Community saint

Thanks for the offer Brian, but at the moment I'm more interested in finding out if there is a reason for it being there rather then just trying to fix it.

I like to understand why thing happen and I don't want to jump to the conclusion that this is a bug that needs fixing.

I wait and see what Chris has to say (I'm assuming that Chris will most likely be the ocProducts person that replies :P).

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#67751
Avatar

Community saint

Yes, I think the man never rests lol I often wait to reply if I see him on line to see if he has time and does. He is no doubt the best one to answer your question.
Back to the top
 
Posted
Rating:
#67753
Avatar

temp1024 said

Chris, the use of Keep_theme=??????? in URLs seem inconsistent and I'm wondering why/when exactly its needed (other them testing).

The only obvious place that I can find where it is used is in the poll "view all" link.

I want to avoid the possibility that theme names can get bookmarked in case I change it in the future.
You're right, this happens on my sites too - well spotted! I'm sure Chris will be able to shed some light on this.


Like ocPortal on Facebook:
Back to the top
 
Posted
Rating:
#67769
Avatar

Fix attached.

Attachment
sources/polls.php
» Download: polls.php (17 Kb, 71 downloads so far)


Explanation: The poll is in an iframe so voting doesn't do a page refresh (we don't use AJAX for this kind of thing for web standards reasons). The theme is passed to the frame via keep_theme so that it knows what to run (because in theory the poll might run with different themes in different zones). The problem is that then leaks into the links, which is not good. So this fixes it :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#67782
Avatar

Community saint

Thanks for the info Chris :thumbs::thumbs:.

The fix works fine :thumbs:

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: