Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Stuck! Manifest.json returns 403

Solved by Vadym View solution

Started by DrPen 1 year ago · 10 replies · 733 views
1 year ago

Why is this happening? I checked the chmod (604) but Im fairly sure it isn't that. Is there anything I need to do in the Grav config so that its recognised? Json is not included in the unsafe protocols, extensions or tags lists.

I'm linking in the base.html.twig, like this:

<link rel="manifest" href="{{ url('theme://assets/manifest.json') }}" />

1 year ago

@penworks,

  • Using fresh Grav with Quark on Windows 11 with Ubuntu 24.04 inside WSL
  • Created file ./user/themes/quark/assets/manifest.json using VSCode
  • Added inside base.html.twig
    <link rel="manifest" href="{{ url('theme://assets/manifest.json') }}" />
  • Generated HTML contains:
    <link rel="manifest" href="/user/themes/quark/assets/manifest.json" />

No errors.

Questions:

  • Is your file's access permissions equal to other files inside assets or *images"?
  • Is your file's owner and group equal to other files inside assets or *images"?
1 year ago

Yes the owner is the same. I used Sublime to create the file, on Windows. and sftp using WinSCP. The folder is 705, all the other file permissions are 604, I checked.

1 year ago pamtbaau @b.da, I'm not that well versed in .htaccess... The .htaccess in the root folder of Grav h…

@pamtbaau:
The .htaccess in the root folder of Grav has the same restrictions.

@pamtbaau, yes, it's in the same commit. Not an expert in this part either, although everything seems clear here. I just remember an issue arose, and I quickly found a solution, and thought that blocking seems logical, as Flex Objects specifically use .json format and should not be accessible. You can test access to ../user/data/flex-objects/contacts.json.

👍 1
1 year ago

@penworks, Please mark the reply from @b.da as "solution" since it did solve your issue.

1 year ago

@pamtbaau OK, thanks for reminder. Thanks for your input also as has prompted further useful info.

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 weeks ago
2 307 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago