aaroneaton / better-yourls

Source code for the Better YOURLS WordPress plugin
21 stars 6 forks source link

Editing custom menus can create shortlinks #14

Closed dgw closed 8 years ago

dgw commented 8 years ago

Seems most likely to happen when adding a new item to a nav-menu and saving it. Haven't looked too far into this, but it probably has something to do with how menus are stored internally.

The shortened URLs look like, for me (with the /yyyy/mm/slug-here/ permalink structure), http://domain.tld/2016/01/1234/, where 1234 appears to be a revision ID or something like that.

ChrisWiegman commented 8 years ago

Thanks for the report on that. I'll take a look into it this weekend. Have the other changes helped you?

dgw commented 8 years ago

Excluding post types has been a big help, so many thanks for that! Earlier this month I had a post with a custom keyword input use the auto-generated shortlink instead, but haven't been able to reproduce since. (I also might just stop using custom keywords for most posts because it's tedious to make them up. :P)

Old posts seem to be getting shortlinks generated one way or another, either as I update them with minor changes to adapt to my new theme or as they're visited by crawlers. So I think #5 might be solved. If you want statistics on how many past posts have/haven't had links generated I'd be happy to go in and query the database for you and report back.

ChrisWiegman commented 8 years ago

Looking into the OP a bit... I'm afraid I'm not able to replicate the issue but I think it may be due to my workflow. I create a page, which generates the link as appropriate upon save, and then I add it to a menu. As the link is already there nothing is changed. Can you please tell me what I'm getting wrong here?

ChrisWiegman commented 8 years ago

I stand corrected. Needed to clear cache and check my link list. I'll have a fix for this in the next release. Thanks for the report.

ChrisWiegman commented 8 years ago

Fix pushed. Please let me know if you still see the issue.

dgw commented 8 years ago

So far so good. No new shortlinks created when I updated the plugin and then edited a couple menus just now. :+1: Thanks again!