Jump to content

Recommended Posts

Posted

Hi.

I recently updated to the latest version of ProcessWire and have been experiencing strange behaviour. I tried really hard to find a solution but searching about this subject proved to be quite hard.

It seems that if I have "./" in the name or title of a page, I can't find it with autocomplete, for example. If I type in "5./JR 5", the ajax autocomplete response looks like this:

{"selector":"template=military-unit,sort=length,has_parent=539607,templates_id=72,status<2048,title%=5 j5,limit=50","total":0,"limit":50,"start":0,"matches":[]}

This makes me think that the "./" is sanitised from my input.

Another behaviour I experience is that if a page name (or url?) ends with "./" page is not found. I suspected the .htaccess at first but found no solution. I'm starting to think that these things are somehow related. Can anyone push me to the right direction?
 

Posted

Yes, this started after the upgrade. The version I still have on my computer, where everything works, is most likely quite old - it's 2.7.2. The current live version is 3.0.165.

Posted

Ok, it seems that I have found the root cause. In wire/core/Sanitizer.php - Sanitize selector value (version 2, 3.0.156+) function has a reduction:

line 2295: $reductions = array('..' => '.', './' => ' ', '  ' => ' ');

This causes the problem in case someone else is wondering the same thing.

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...