Ran into Funny WordPress Situation with Attachments

This post contains affiliate links.

So I implemented a new form where guest authors can submit their articles as an attachment and I would be able to read and review before I publish it, but I ran into a quirky WordPress issue that I didn’t run into before.  Formidable Pro when it allows attachment uploads puts them in the wp-content/uploads/formidable folder by default, but these also get recognized and seen by the WordPress media editor

image

When the title of the word document say called How-To-Be-A-Blogger.docx was uploaded, remember it turns spaces into dashes by default in file names, and then I did the article title How to Be a Blogger, with the slug sitename.com/how-to-be-a-blogger well the article publishes but when anyone tries to hit the article it auto redirected to the attachment .docx URL instead of displaying the article.

This is because WordPress by default looks for a physical name match of the URI slug before it pulls from the WordPress Post Database, since that exact slug matched except for the .docx it just redirected to the attachment, and the article was not able to be seen.

If you manually delete the .docx file from your WordPress uploads via FTP or your hosting provider this won’t solve the problem, the only solution is to manually remove the attachment from your WordPress Media Screen.

Word to the wise, never accidentally use the same name for a post slug as a document or attachment upload.

WPX Support

WPX Support

WPX Support

Latest posts by WPX Support (see all)

Updated: May 28, 2013 — 8:02 pm