• Resolved rubensino

    (@rubensino)


    Hi,
    for some time opening PDF files has resulted in the 404 error. The reason is that the path is incorrect. In the preferences I had set the Public Root Path, but when I try to open the PDF this path is ignored and refers to the default one.
    The correct path would be “home / mysite / wp-content / uploads / myfolder / myfile.pdf” but when I try to open the file the path becomes home / mysite / myfile.pdf and then I get a 404 error.
    Can you tell me what the problem can be? Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support File Manager Support

    (@filemanagersupport)

    Hey @rubensino,

    Thank you for highlighting your issue.

    We would surely assist you with your queries please log a ticket on our support desk: https://filemanagerpro.io/contact.

    Our support team would like to assist you with your query.

    Regards,
    Support Team

    I’m not sure if you ever got a response to this, but I had the same problem when I installed this yesterday and discovered that it is due to the plugin being designed to function only when the root folder is set to your public_html folder in the plugin preferences. I was able to resolve this issue with a small modification to the main plugin .php file. If you can locate the section of the code with the comment label “Path View” there is an if statement that creates the URL, in the pro version this if statement begins on line 2487. My solution, which allows the root folder to be set to any folder below the public_html folder, was to change the if statement from this:

    if(!empty($accessfolder)) {$siteUrl .= ‘/’.$accessfolder;}

    to this:

    if(!empty($accessfolder)) {$siteUrl .= substr($absolute_path, strpos($absolute_path, ‘public_html’)+11).$accessfolder;}

    This assumes the root folder path you have set in the plugin preferences ends with a forward slash /

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t open PDF – error 404’ is closed to new replies.