Support » Plugin: Document Repository » extras.php assumes WP installed in root?

  • Resolved John Parris


    When clicking the Insert Document button in the post editor, I was getting a blank screen in the modal. The browser console was showing that it was getting an error trying to retrieve /?media-library=1. My (single, not MS) install exists in /documents, so this doesn’t work.

    I changed the path so that it matches my install (line 160 in extras.php), and it works. It’s only a temporary solution.

    Is this plugin supposed to be used on sites installed at root?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ron Rennick


    Do you me WP is installed in its own folder but the site URL is in the root?

    No, WP is in /documents with the URL pointing to /documents. The only thing “special” about this setup is that it’s running on a non-standard port… site:8000/documents, but I wouldn’t think that’s causing this. Although it might be. I haven’t tested on another site.

    Plugin Author Ron Rennick


    It could be the port. I haven’t tested it with any port other than 80/443.

    Hey Ron, I just tested this on another site without a custom port and the problem still happens there.

    Config is like this:


    WP installed in – local file system is /var/www/

    Vanilla install with no other plugins activated.

    The modal comes up blank and logs show it’s requesting /?media-library=1.

    If I edit line 160 in extras.php and make it this:
    $url = RA_DOCUMENT_REPO_URL . '/doc/?media-library=1' . $domain_qs;

    the modal comes up fine and things work as they should.

    It looks like on line 29 the constant gets defined as ''. Can the built in site_url function be used on line 160 instead?

    Plugin Author Ron Rennick


    You define RA_DOCUMENT_REPO_URL in your wp-config.php to have the correct URL.

    Yes, that works. Didn’t know if this was expected or what. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘extras.php assumes WP installed in root?’ is closed to new replies.