shanecoughlan / data-twist

Experimental script to twist Open Data into new shapes
5 stars 1 forks source link

Entries that include brackets "( )" in the `post_name` don't display properly via Wordpress. #9

Closed shanecoughlan closed 11 years ago

shanecoughlan commented 11 years ago

This applies to version 0.9 (and before?).

Entries that include brackets "( )" in the post_name don't display properly via Wordpress. You get a missing page error. This can be an issue with some OpenStreetMap data. It sometimes has a title like "松江 (Matsue)" and that appears as "%E6%9D%BE%E6%B1%9F-(matsue)-265970626"

The solution is to edit such entries to read "%E6%9D%BE%E6%B1%9F-265970626" or similar. In other words, delete "-(ANYTHINGHERE)"

You can do this in the SQL file. We also did it through phpMyAdmin. The solution is probably to change how to show post names, and just use the post ID number to ensure various different languages and strange titles don't break URL formatting.

shanecoughlan commented 11 years ago

Fixed in 0.10

Sat Feb 24 12:30:00 2013 Shane Coughlan shane@opendawn.com

* In the 'output' area, at "array.each { |a|",
  item 12 and 19, I substituted "#{a[6]}-#{a[3]}"
  (the title+ID combination) with "#{a[3]}" (title)
  to squash a bug with broken URLs and blank posts
  in Wordpress. Looks good.