Forum

Thread tagged as: Question, Problem, Configuration

My assets aren't linking correctly

Hey guys!

I've not been able to use the assets section since upgrading to 2.8. I can upload assets and Perch is registering them.. here's my assets page

https://cl.ly/image/372x3l0W3J27

However, you'll see they're broken images. The url for these images appear to be: - https://mrqwest.co.uk/perch/mrqwest/resources/westfieldcdn.jpg

this is a bad url. there isn't a 'mrqwest' directory within my perch folder. So if I remove that from the URL, the image works!

My question is, what have I done to have a broken resources URL?

Anthony Killeen

Anthony Killeen 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Could we see your Diagnostics Report please, and a template where this happens.

Sure. Diagnostics report below. This is part of the Perch dashboard, so I'm unsure what template you'll need?

Perch: 2.8.7, PHP: 5.4.40, MySQL: 5.6.23, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.7), assets (2.8.7), categories (2.8.7), perch_blog (4.6), perch_comments (1.1)
App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); include(PERCH_PATH.'/core/apps/categories/runtime.php'); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/mrqwestc/public_html/mrqwest/perch
PERCH_CORE: /home/mrqwestc/public_html/mrqwest/perch/core
PERCH_RESFILEPATH: /home/mrqwestc/public_html/mrqwest/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/mrqwestc/public_html/mrqwest
HTTP_HOST: mrqwest.co.uk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

I won't post the full advanced diagnostics but I did note the following:

PERCH_RESPATH: /perch/mrqwest/resources

That appears to be the offending value... or at least I think it is!

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yes, you have a subfolder in there, so what Perch is doing is correct, it is creating the path with the subfolder in it.

Thanks Rachel, but surely the PERCH_RESPATH should be /perch/resources?

Can you tell me where I need to go to adjust that PERCH_RESPATH value?

Ignore me! Found it in config.php :) Thanks for your help Rachel.