Forum

Thread tagged as: Problem, Error

Assets manager not appearing

I updated to 2.8.18 today, and now I cannot use the assets manager anymore locally. When I click on "select or upload an image", the revealing animation starts, but it reveals nothing:

screenshot

It's also not working on entries, that already have an image selected. It works on remote, but not on my local server.

Perch: 2.8.18, PHP: 5.5.29, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.18), assets (2.8.18), categories (2.8.18), perch_blog (4.5.4)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Library/WebServer/Documents/das_buendnis/perch
PERCH_CORE: /Library/WebServer/Documents/das_buendnis/perch/core
PERCH_RESFILEPATH: /Library/WebServer/Documents/das_buendnis/perch/resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
Resource folder writeable: Yes
HTTP_HOST: das_buendnis.local
DOCUMENT_ROOT: /Library/WebServer/Documents/das_buendnis
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Thomas Semmler

Thomas Semmler 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is your javascript caching?

Drew McLellan said:

Is your javascript caching?

No! This is the error I get in the console:

XMLHttpRequest cannot load https://das_buendnis.local/perch/core/assets/js/headroom.min.js?v=2.8.18. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://project.local' is therefore not allowed access.

XMLHttpRequest cannot load https://das_buendnis.local/perch/core/assets/js/handlebars.runtime.js?v=2.8.18. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://project.local' is therefore not allowed access.
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I think this is because you have an underscore in your hostname (believe it or not) I ran into the same issue a few days ago.

The access control stuff means the browser doesn't treat it as the same origin (live domain names don't have underscores in them).

Rachel Andrew said:

I think this is because you have an underscore in your hostname (believe it or not) I ran into the same issue a few days ago.

The access control stuff means the browser doesn't treat it as the same origin (live domain names don't have underscores in them).

You are right, another project doesn't have this issue at all. That's vey interesting to know. It's kind of an old habit to always use underscore instead of minus. Thanks for helping!

Rachel Andrew

Rachel Andrew 394 points
Perch Support

I'm going to add this to the docs somewhere as we'll no doubt see more people running into it. At least if we can make it searchable it might help!