Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2007, 09:46 AM
New Pligger
 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 2 Times in 2 Posts
Exclamation [Fixed] Ampersand (&) in Category name shows All

I have a small problem with my site. I am using the Paul01 template (although I do not believe this to be significant). And method 1 of category access(?) - passing the category as a GET variable.

When trying to access categories that contain an ampersand (&), ie: Health & Fitness, all news items are displayed. If no ampersand is contained within the category name, only the posts from the requested category appear.

The ampersand in the URL is clearly being interpreted as the mark for a second variable (as it should). The result of which being that a non existent category is being searched for.

http://www.domain.com/index.php?category=Food&Drink

Category "Food" is searched for. No results are displaying all posts.

I imagine this could be fixed by converting any ampersands into another character or removing them completely, like whitespace, from the database and subsequent queries.


Any thoughts / ideas / quick fix / patches?
Reply With Quote
  #2 (permalink)  
Old 03-06-2007, 09:47 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Have a link to your site? As far as I am aware, the category links use the category safe name which gets rid of all the special characters.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 03-06-2007, 09:53 AM
New Pligger
 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 2 Times in 2 Posts
Beev, you must be a machine :P

Its a dev version at the moment located here: www.ongoss.com

The same situation seems to occur in Post Title's also:

http://www.ongoss.com/story.php?titl...ons-on-Website

Although this results in a blank page (as I imagine post "Advice-" is not being found).


Im running Pligg Beta 9.1 on apache.

Last edited by Biomech; 03-06-2007 at 09:58 AM..
Reply With Quote
  #4 (permalink)  
Old 03-16-2007, 01:28 AM
Luca's Avatar
Pligg Donor
 
Join Date: Jan 2007
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
Hi Biomech,
I do not have the complete solution however I have a concept of what is happening. I have had the same problem.

Lets say you have the following two categories:
Apple and Banana
Orange & Cherry

When index or upcoming is called, it is passed the category 'safe name'. Which would be the following strings in our case.
AppleandBanana
Orange&Cherry

The page then attempts to pick up the category passed to is with the follwing code $_REQUEST['category']

This code does not work properly for some charaters. Thus the output of this for our categories is
AppleandBanana
Orange
(the '&Cherry' as has not been dropped, ie after a different character the rest of the string is dropped.)

Thus if you wanted category 'Orange & Cherry' the page does not recognise your it, thus assumes you want 'all', which it does by default.

We need someone, with better php knowledge than myself, to explain why $_REQUEST['category'] drops certain category information when other characters are used.

Sorry I could not give you the answer however that maybe this gets us a step closer. Your interim solution is not to use the '&' or other characters.

Cheers,
L.

Last edited by Luca; 03-16-2007 at 01:33 AM..
Reply With Quote
  #5 (permalink)  
Old 03-16-2007, 01:35 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
I think Ash fixed this last week http://pligg.svn.sourceforge.net/vie...v&revision=813
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #6 (permalink)  
Old 03-16-2007, 07:02 PM
New Pligger
 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 2 Times in 2 Posts
Thx

Sweet, I'll check it out and see what happens
__________________
--
Biomech
www.hidemyemail.net
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of meta description - categories Divisive Cotton Suggestions 64 11-23-2008 07:37 PM
[Fixed] Category Deleted Templora Bug Report 6 04-30-2007 08:39 PM
[Fixed] Category problem moocow Bug Report 2 03-25-2007 03:13 PM
[Fixed] Click "read more" the category links screw up mlbier General Help 12 02-15-2007 01:32 PM
[Fixed] Changing category url hooperman Bug Report 7 02-14-2007 08:19 PM


Search Engine Friendly URLs by vBSEO 3.2.0