• Welcome to BirdForum, the internet's largest birding community with thousands of members from all over the world. The forums are dedicated to wild birds, birding, binoculars and equipment and all that goes with it.

    Please register for an account to take part in the discussions in the forum, post your pictures in the gallery and more.
ZEISS DTI thermal imaging cameras. For more discoveries at night, and during the day.

Pages that need to be removed (1 Viewer)

Delia, this is another example of the dreaded & sign in work, making the entry inaccessible and therefore impossible to delete.

JT, I have deleted that one.

Cheers
Niels
 
he he he do you think we both deleted that one at the same time Niels?:-O

Perhaps that's the way to get rid of those awkward ones!

D
 
he he he do you think we both deleted that one at the same time Niels?:-O

Perhaps that's the way to get rid of those awkward ones!

D

I am afraid we will have to get out some heavier equipment :storm: for the ones containing things like &, ", <, or >.

Niels
 
Ok, I think I have found a (sort of) solution that will stop the ampersands from causing problems. However, it will cause a similar problem with question marks. Has anyone come across many pages with question marks? If not, it makes sense to apply the change.

There is another solution involving patching apache, but I'm still looking into it to make sure it won't break anything else!
 
For the technically minded who were wondering why this is happening...

Apache's mod_rewrite un-escapes various hex-encoded characters which have special meaning in URLs, mostly the question mark (?) and ampersand (&).

The result of this is that an incoming URL like:

Code:
/opus/Birds %26 Bees
gets rewritten to:

Code:
/opus/index.php?title=Birds & Bees
whose query string gets parsed into this list:

Code:
title => 'Birds'
  Bees     => ''
The easy workaround is for me to switch to using the PATH_INFO-style URLs:

Code:
RewriteRule ^/opus/?(.*)$ /opus/index.php/$1 [QSA,L]
The '&' character has no special meaning in the _path_ part of the URL so the rewritten form works:

Code:
/opus/index.php/Birds & Bees
However now the titles with question marks will fail similarly, because the question mark separates the path from the query string.

If you didn't understand a word of that, don't worry :)

:eat:
 
Hi Ollie, I cannot personally remember a title with a question mark; that would not make sence to me. However, there are two other special characters I have seen make trouble, the quaotation mark and the 'larger than', the latter in a construct like this '-->'

Cheers
Niels
 
I have altered the code - most pages with ampersands and quotes should now be accessible again, although there may still be problems with pages with titles with more than one ampersand in (not aware of any of those though).

It's still wise to avoid ampersands and quotations where possible however - probably best to move the pages. At least now they should be more accessible.

Let me know if this change has caused any other quirks to rear their ugly heads.

Ollie
 
I've also run an update on the database to fix the weird quote problems - they should be accessible too now.

Ollie
 
Warning! This thread is more than 15 years ago old.
It's likely that no further discussion is required, in which case we recommend starting a new thread. If however you feel your response is required you can still do so.

Users who are viewing this thread

Back
Top