Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create menu items linking to existing files #3945

Open
stpaultim opened this issue Jul 22, 2019 · 6 comments
Open

Cannot create menu items linking to existing files #3945

stpaultim opened this issue Jul 22, 2019 · 6 comments

Comments

@stpaultim
Copy link
Member

Description of the bug
I'm in a little over my head here. But, I'll report this and we'll see if it makes sense.

As I described in the forum I tried to create a menu link directly to a PDF in the file system, but I get an error message saying "The path '...' is either invalid or you do not have access to it."

I would expect to be able to create a menu link to a file uploaded to Backdrop.

Edit_link___Core

In this issue @jenlampton said the following:

the menu system checks links to make sure they are registered system paths. We need to remove that validation too.

Which lead me to open this ticket and call it a bug (which might not be accurate).

Steps To Reproduce
To reproduce the behavior:

  1. Create a file field on a content type.
  2. Add a file to a node and save
  3. copy the relative path to the file in the file directory
  4. Try to create a menu item linking to that file.
@jenlampton
Copy link
Member

There may be another issue about this already. The original use-case was to allow people to create the entire menu before any of the content, layouts, or views existed. Then add those items in later.

@klonos klonos changed the title Remove validation for registered system paths from Menu System Cannot create menu items linking to existing files Jul 22, 2019
@klonos
Copy link
Member

klonos commented Jul 22, 2019

...open this ticket and call it a bug (which might not be accurate).

Title change makes it a bug 😉

@jenlampton the issues you are referring to are #434 and #422, but these are different to the problem described here.

@jenlampton
Copy link
Member

Not really - the system was never designed to do this, so it's still a feature request. And the same code change would solve both problems...

@klonos
Copy link
Member

klonos commented Jul 22, 2019

...the system was never designed to do this, so it's still a feature request.

If by "system" you mean old Drupal versions, and by "not designed to do this" you mean path validation failing to recognize existing file paths, then I agree; but that does not make it a feature request. At the very least, that error message saying that the path is invalid, or that the user does not have permissions to access it, is incorrect in this case; hence a UX bug.

The difference with #422 is that in that issue we will try to make it so that validation is ignored for all paths, while this issue here is to accept valid/existing paths for what they are, and not complain incorrectly.

Having said that, I understand that implementing what is being discussed over in #422 may make this issue here moot. We just need to account fo valid/existing file paths in the warning we throw (if that will be what we go with there).

Lets postpone this issue over #422 then.

@jenlampton
Copy link
Member

jenlampton commented Jul 22, 2019

that error message saying that the path is invalid, or that the user does not have permissions to access it, is incorrect in this case

A URL to a file is not actually a "valid system path" so the error here is technically correct. The problem is that any normal human being would (and should) think that a path to a file is valid.

UX bug - sure. But also it's a feature addition because we'd need to add something that would allow the system to recognize file paths :)

@klonos
Copy link
Member

klonos commented Jul 23, 2019

Agreed; I tend to think things from a non-coder PoV, so was all bug to me 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants