Forum

Thread tagged as: Error

Problems with assets Perch 3.0.10

I've updated to the latest version of Perch Runway this morning, but I'm experiencing some problems with Assets.

This is the second website I've had problems related to 3.0.10 and assets.

UPDATES

  • 11:27 am Checking the forum for similar issues I found two commands which I had hoped would do something: /perch/core/update/?force=update and /perch/core/apps/assets/reindex. Neither have helped.
  • 10:29 am: A third website I've recently updated is working fine. Makes me think the issues are local to this particular website. Other than updating the core folder is there anything else I can/should do?

Assets are missing in the CMS, although they're still in the resources folder, and the public facing part of website is displaying images. Here’s a video showing the issue.


Internal server error. When I edit a page that has an image upload field I see this message in the Google Dev Tools console.

GET https://gpe.dev/perch/core/apps/assets/async/asset-filter/?v=3.0.10&_=1506069438716 500 (Internal Server Error)

Message says it's missing this file vendor.23f8a1427c17ade109a3.js in the asset-filter folder. But I've checked, the file is in the folder? Here’s a video


Can't upload assets. Same page as above, clicking select or upload a file displays the assets window but I can't upload anything. When I try another error is logged to console. Here’s a video

Unlike the other website I was having problems with, this site has a bucket list:

  <?php 
   return array(    

    'blog' => [
        'type' => 'file',
        'web_path'  => '/perch/resources/blog',
        'file_path' => $_SERVER['DOCUMENT_ROOT'].'/perch/resources/blog'
    ],

    'towns' => [
        'type' => 'file',
        'web_path'  => '/perch/resources/towns',
        'file_path' => $_SERVER['DOCUMENT_ROOT'].'/perch/resources/towns'
    ],

    'backup' => [
             'type'      => 'dropbox',
             'web_path'  => '',
             'file_path' => 'backups',
    ],

);
  ?>

Is there anything I can do/try to fix this?

Summary information

Perch Runway: 3.0.10, PHP: 7.0.15, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10), perch_blog (5.6.1), perch_forms (1.9.1)
App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/stephen/Repositories/gpe/perch
PERCH_CORE: /Users/stephen/Repositories/gpe/perch/core
PERCH_RESFILEPATH: /Users/stephen/Repositories/gpe/perch/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 256M, Memory: 512M, Total max file upload: 128M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/stephen/Repositories/gpe
HTTP_HOST: gpe.dev
Stephen Meehan

Stephen Meehan 4 points

  • 3 years ago

Hi Stephen,

Can't shed any light but one thing you could try is the manual update from within Perch. Go to Settings > Diagnostics then the Update button is top right. Worth a shot - hope you manage to resolve it.

Hi Mike

Thanks for taking the time to respond to this post.

Looks like pressing that button is the same as running /perch/core/update/?force=update in the URL.

Unfortunately, it's not worked. Still experiencing the problems listed above.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the corresponding error message from your log for the server error?

That's the strange part, there are no error messages in the php_error.log. The errors mentioned (including the internal server error message) above only show up in the console in Google Dev Tools.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's unusual. Can you load that URL directly?

No, the URL in the message doesn't point at a file:

  https://gilston-park-estate.dev/perch/core/apps/assets/async/asset-filter/?v=3.0.10&_=1506087735141

Hopefully something in the screencast will shine some light on this...

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm in an airport, so screencasts aren't going to load for me today.

What do you mean by the URL not pointing to a file? Do you get a 404? There should be a file there.

Ok, really appreciate you looking at this.

What about a screenshot? Can you view the image below?

Perch Screenshot

I mean the error message isn't pointing to a file, it's looking for ?v=3.0.10&_=1506088986271 at the end of the message.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Right, so what happens if you enter this URL in your browser?

https://gilston-park-estate.dev/perch/core/apps/assets/async/asset-filter/?v=3.0.10&_=1506087735141

I see a HTTP 500 error page, screenshot below. Perch Screenshot

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so there should be an error in the server log.

Aha! There is an error in the apache_error.log, I was looking in the wrong log earlier!

Does this help?

[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr: Handler not found: dropbox
[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr: PHP Fatal error:  Uncaught Error: Call to a member function get_name() on null in /Users/stephen/Repositories/gpe/perch/core/apps/assets/modes/_smart_bar.php:39
[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr: Stack trace:
[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr: #0 /Users/stephen/Repositories/gpe/perch/core/apps/assets/async/asset-filter/index.php(39): include()
[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr: #1 {main}
[Fri Sep 22 15:38:25 2017] [error] [client ::1] FastCGI: server "/Applications/MAMP/fcgi-bin/php7.0.15.fcgi" stderr:   thrown in /Users/stephen/Repositories/gpe/perch/core/apps/assets/modes/_smart_bar.php on line 39

Fixed it.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Looks like an issue with Dropbox. Is your backup bucket working ok?

I had defined a backup in buckets.php, but I was missing this in runway.php

    'dropbox' => [
     'access_token' => '[ADD TOKEN HERE]',
    'handler'      => 'PerchDropbox_ResourceBucket',
    'handler_path' => PERCH_CORE.'/runway/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php',
    ],

Putting this back in fixed the problem (and all the others). Phew.

I tried to get backup to work with this particular website a long time ago, but couldn't get it to work with the hosting.

I've got backup working with other websites (on better hosting).

I'll look into setting backup again at a later date, I'm just happy I can see the assets and upload images again!

Thanks for your help debugging this.