ElFinder in NewsPublisher - Unable to connect to backend 404

Modx version 2.7.3; NewsPublisher version 3.0.4.

Works perfectly on my PC (running XAMPP on Windows 10), but I have transferred everything up to my webspace (running linux) and get the following error:

When I go into ElFInder and click the camera button to get to the filestore, I get the following message:
image
“The requested URL was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request”

Similarly, if I try to insert a file into a static-file TV, I get the following:
(I was not allowed to include the image, as I’m a new boy!)
“Unable to connect to backend. Backend not found. HTTP error 404.”

I have installed NewsPublisher from scratch on the live site.
I have investigated everything I can think of, including searching through a listing of the DB to see if there is anything in there that looks suspicious.
I have checked the permissions on the filestore, and the folders are all 775 and the files are all 664.
I have logged in on the front end as the SuperUser, and get the same error.

As far as I can see, everything looks the same on the webspace as it does on the PC.

Can anyone help me to get to the root of this issue?

Thanks in advance.

My best guess is that you need to set or modify one or more of these properties.

Also, see the “Configuring elFinder” section on that same page.

Thanks Bob. However, since using ++site_url etc. does not work, I’ve tried every permutation of http://www.mydomainname.net/folder/ that I can think of, but everything gives me the same error message.

Any other ideas?

I would like to try doing a trace to see exactly what URL is being “not found”, but I’m afraid I’m not very well up on PHP, and even less well up on Javascript, so if you have any hints or tips on where I might start, or how to get that info displayed, I would be most grateful for your help.

If you turn on dev tools in Chrome or Firefox (F12 or Ctrl-shift-i), and watch the network tab, you should see the 404 and the URL.

Thanks, Bob. That has shown me what the problem is.
Believe it or not, it was Friendly URLs! I had switched them off when I uploaded the site, as I was having difficulties getting everything set up correctly. So, when I switched on FURLS just now, it worked OK.

Thanks again.

(By the way, I installed your sitechecker, and it was invaluable in getting my earlier issues resolved, so thanks for that one, too!)

I’m glad you got it sorted. Thanks for reporting back. :slight_smile:

Hi Bob -

I’m having a similar issue as the OP - 404 error when launching el finder.

I’ve set the &browserBasePath and &browserBaseURL parameters, and file_manager is enabled in the NewsPublisher ACL policy.

This occurs on an instance of ModX 2.8.3 served locally using XAMPP.

The error is an incorrect filepath to the npelfinderconnector.html file. This is what I see:

http://localhost:3000/kurvup/npelfinderconnector.html?media_source=1&cmd=open&target=&init=1&tree=1&_=1638465385232

XAMPP is a little challenging with access permissions, but the assets directory and everything within is read / writeable.

Any ideas on what else I might try? Thanks

Do you know why there’s a port number in your URL? NP would not put one there.

Does http://localhost/kurvup/npelfinderconnector.html also give you a 404?

Yes, it does provide a 404 without the port. Should that path resolve at the top level of the site?

The port is there are a result of using Gulp as a task runner - I had that active at the time I made this post, but the 404 error occurs whether or not Gulp is active.

If you open the resource with the title “npElFinderConnector” in the manager and then click on the button “View”, does that work (meaning no 404)? What is the URL in this new browser tab that opened?

With the elFinderConnector snippet configured as

[[!npElFinderConnector?
    &browserBasePath=`[[++site_url]]/assets`
    &browserBaseURL=`/assets`
]]

viewing the elFinderConnecter resource produces:

{"error":["errConf","errNoVolumes"],"debug":["Driver \"elFinderVolumeLocalFileSystem\" : Root folder does not exist."]}

The default snippet (i.e. [[!npElFinderConnector]])) produces:

{"error":["errUnknownCmd"]}

when viewing the ElFinderConnectorResource.

Both snippet configurations produce the 404 error when trying to access el finder via the file tv.

You said that the url http://localhost:3000/kurvup/npelfinderconnector.html is wrong and returns a 404 error.

But when you view the elFinderConnecter resource in the manager there is no 404 error (only {"error":["errUnknownCmd"]} which is normal when viewed like this). So what is the correct url of this page (shown in the address bar of the browser)?

Where did I say that the URL is “wrong”? All I mentioned is a 404 error produced after interacting with the file TV.

The elFinderConnecter URL is http://localhost/kurvup/index.php?id=22

The issue was caused by elfinder seeking npelfinderconnector.html. This project is served locally, and I hadn’t enabled friendly URLs.

Sorry, I assumed you had tried that, since it solved the exact same problem for the person who started this thread.

I completely overlooked it - my bad. Loving NewsPublisher – thank you!

---- You’re welcome! ----