{"action":"created","issue":{"url":"https://api.github.com/repos/publiclab/plots2/issues/682","repository_url":"https://api.github.com/repos/publiclab/plots2","labels_url":"https://api.github.com/repos/publiclab/plots2/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/publiclab/plots2/issues/682/comments","events_url":"https://api.github.com/repos/publiclab/plots2/issues/682/events","html_url":"https://github.com/publiclab/plots2/issues/682","id":171750728,"number":682,"title":"Wiki pages broken where title and path did not match, or where path did not include \"wiki\"","user":{"login":"jywarren","id":24359,"avatar_url":"https://avatars.githubusercontent.com/u/24359?v=3","gravatar_id":"","url":"https://api.github.com/users/jywarren","html_url":"https://github.com/jywarren","followers_url":"https://api.github.com/users/jywarren/followers","following_url":"https://api.github.com/users/jywarren/following{/other_user}","gists_url":"https://api.github.com/users/jywarren/gists{/gist_id}","starred_url":"https://api.github.com/users/jywarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jywarren/subscriptions","organizations_url":"https://api.github.com/users/jywarren/orgs","repos_url":"https://api.github.com/users/jywarren/repos","events_url":"https://api.github.com/users/jywarren/events{/privacy}","received_events_url":"https://api.github.com/users/jywarren/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/publiclab/plots2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/publiclab/plots2/labels/priority","name":"priority","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-17T20:19:49Z","updated_at":"2016-08-17T22:55:00Z","closed_at":null,"body":"https://publiclab.org/openhour for example, which is now available at https://publiclab.org/wiki/openhour\r\n\r\nOther pages like https://publiclab.org/wiki/about are affected because it's title was \"About Public Lab\" and so its new URL is https://publiclab.org/wiki/about-public-lab\r\n\r\nThis is high urgency; many, including some of our most important pages. are affected. \r\n\r\nThis is related to the `friendly_id` work, @ananyo2012. I'll be in [Gitter](https://gitter.im/ananyo2012/plots-gsoc) to coordinate fixing.\r\n\r\nThis is not just root level wiki pages; `/wiki/organizers` was changed to `https://publiclab.org/wiki/public-lab-organizers`. I believe the migration mentioned above has made all slugs match titles, which broke many existing URLs. I think this may not even be a root wiki issue, but a batch migration renaming issue. \r\n\r\nThe new migration resaved all nodes, here: https://github.com/publiclab/plots2/blob/master/db/migrate/20160816094642_seed_slugs_column.rb#L3 and caused the url to change and follow whatever the title was. See a failed attempt to change a url back, here:\r\n\r\n```ruby\r\n2.1.2 :014 > n = DrupalNode.first\r\n  DrupalNode Load (1.9ms)  SELECT \"node\".* FROM \"node\" LIMIT 1\r\n => #<DrupalNode nid: 1, vid: 0, type: \"page\", language: \"\", title: \"About\", uid: 1, status: 1, created: 1467898382, changed: 1471467098, comment: 0, promote: 0, moderate: 0, sticky: 0, tnid: 0, translate: 0, cached_likes: 0, drupal_comments_count: 0, drupal_node_revisions_count: 1, path: \"/wiki/about\", main_image_id: nil, slug: \"about\"> \r\n2.1.2 :015 > n.path = \"/about\"\r\n => \"/about\" \r\n2.1.2 :016 > n\r\n => #<DrupalNode nid: 1, vid: 0, type: \"page\", language: \"\", title: \"About\", uid: 1, status: 1, created: 1467898382, changed: 1471467098, comment: 0, promote: 0, moderate: 0, sticky: 0, tnid: 0, translate: 0, cached_likes: 0, drupal_comments_count: 0, drupal_node_revisions_count: 1, path: \"/about\", main_image_id: nil, slug: \"about\"> \r\n2.1.2 :017 > n.save!\r\n   (0.3ms)  begin transaction\r\n  DrupalNode Exists (0.7ms)  SELECT 1 AS one FROM \"node\" WHERE (\"node\".\"path\" = '/about' AND \"node\".\"nid\" != 1) LIMIT 1\r\n   (0.9ms)  UPDATE \"node\" SET \"changed\" = 1471467155 WHERE \"node\".\"nid\" = 1\r\n  FriendlyId::Slug Load (0.8ms)  SELECT \"friendly_id_slugs\".* FROM \"friendly_id_slugs\" WHERE \"friendly_id_slugs\".\"sluggable_id\" = 1 AND \"friendly_id_slugs\".\"sluggable_type\" = 'DrupalNode' ORDER BY \"friendly_id_slugs\".id DESC LIMIT 1                                                                                                    \r\n   (28.7ms)  commit transaction\r\n => true \r\n2.1.2 :018 > n = DrupalNode.first\r\n  DrupalNode Load (1.2ms)  SELECT \"node\".* FROM \"node\" LIMIT 1\r\n => #<DrupalNode nid: 1, vid: 0, type: \"page\", language: \"\", title: \"About\", uid: 1, status: 1, created: 1467898382, changed: 1471467155, comment: 0, promote: 0, moderate: 0, sticky: 0, tnid: 0, translate: 0, cached_likes: 0, drupal_comments_count: 0, drupal_node_revisions_count: 1, path: \"/wiki/about\", main_image_id: nil, slug: \"about\"> \r\n```"},"comment":{"url":"https://api.github.com/repos/publiclab/plots2/issues/comments/240574057","html_url":"https://github.com/publiclab/plots2/issues/682#issuecomment-240574057","issue_url":"https://api.github.com/repos/publiclab/plots2/issues/682","id":240574057,"user":{"login":"jywarren","id":24359,"avatar_url":"https://avatars.githubusercontent.com/u/24359?v=3","gravatar_id":"","url":"https://api.github.com/users/jywarren","html_url":"https://github.com/jywarren","followers_url":"https://api.github.com/users/jywarren/followers","following_url":"https://api.github.com/users/jywarren/following{/other_user}","gists_url":"https://api.github.com/users/jywarren/gists{/gist_id}","starred_url":"https://api.github.com/users/jywarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jywarren/subscriptions","organizations_url":"https://api.github.com/users/jywarren/orgs","repos_url":"https://api.github.com/users/jywarren/repos","events_url":"https://api.github.com/users/jywarren/events{/privacy}","received_events_url":"https://api.github.com/users/jywarren/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T22:55:00Z","updated_at":"2016-08-17T22:55:00Z","body":"I believe all previous paths were lost with the migration. Looking into a script to recover all previous wiki page URLs -- there are 1014 wiki pages. \r\n\r\nMaps also seem to be broken: https://publiclab.org/map/barataria-site-abh2-barataria-bay-louisiana/07-25-2014"}}
{"actor":{"display_login":"jywarren"}}