download_dir doesn't exist and is not writable

Home Forums General discussion download_dir doesn't exist and is not writable

This topic contains 1 reply, has 2 voices, and was last updated by  Andy 4 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #238

    jeffw
    Keymaster

    Directly after activation I get a yellow box telling me…

    You have 2 failed tests. To have a good time with Runway these should be fixed. See the error details on the reports page.

    And on the reports page it says that “/wp-content/uploads/download_dir/” does not exist and also that it is not writable.

    I can fix this by clicking the Fix All Issues button, but would it not be better if activation created the necessary folder?

    • This topic was modified 4 years, 5 months ago by  jeffw.
    #241

    Andy
    Keymaster

    I think you’re right that we need to have this trigger as an automatic check. It should be part of the theme activation process. There are a few hooks since WP 3.x for “on theme activation” or “on theme change” that give different types of functionality.

    after_switch_theme

    If we used “after_switch_theme” it should only fire once, at the time the theme is activated. I believe one of the variables passed in this function is the theme name so we could test if “runway” is being activated to make sure we aren’t running this every time a child theme is called.

    http://codex.wordpress.org/Plugin_API/Action_Reference/after_switch_theme

    after_setup_theme

    There is also the “after_setup_theme” function which is more generic. It runs every time the theme loads so we would be constantly testing for these things. I’m of the opinion it should be a one time check then the Report Manager will come into play alerting the user if a test fails.

    http://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme

    Running it once with “after_switch_theme” is probably best. If you get a message of an issue after this point it might be the case of a new child theme being installed/created, a user moving their themes to another WP install or a folder manually deleted. This seems to cover the intended purpose and allows users to manage their files themselves but still receive a notification of any potential problems. I know I wouldn’t like it if I deleted the “download_dir” folder manually only to have Runway instantly recreate it instantly. There might be a good reason for deleting it or some testing taking place. Having it created in the first place is the only obligation here in my opinion.

    Good suggestion, thanks for bringing it up!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.