WordPress.org

Forums

Document Repository
[resolved] extras.php assumes WP installed in root? (8 posts)

  1. John Parris
    Member
    Posted 3 years ago #

    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?

    http://wordpress.org/extend/plugins/document-repository/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

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

  3. John Parris
    Member
    Posted 3 years ago #

    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.

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

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

  5. John Parris
    Member
    Posted 3 years ago #

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

    Config is like this:

    URL
    http://local.dev/doc/

    WP installed in
    http://local.dev/doc/ - local file system is /var/www/local.dev/doc/

    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.

  6. John Parris
    Member
    Posted 3 years ago #

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

  7. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

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

  8. John Parris
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Document Repository
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.