Forum

Thread tagged as: Problem, Error, Events

Event App Repeaters error

So, I'm having a problem, (Sorry again to Rachel and Matt for posting this in the wrong place before)

I have just updated my version of Perch to the latest and now I can't edit the events on my site. it seems to be an issue with using repeaters in my event template

I can see the list of events but anything with the url: perch/addons/apps/perch_events/edit/ doesn't work.

I was getting a 500 error on the page and I couldn't get any error reports so I added this code:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

to the page perch/addons/apps/perch_events/edit/index.php to show the errors and I got this:

Catchable fatal error: Argument 2 passed to PerchFieldType::__construct() must be an instance of PerchXMLTag, instance of PerchRepeater given, called in ***/perch/core/lib/PerchFieldTypes.class.php on line 66 and defined in ***/perch/core/lib/PerchFieldType.class.php on line 71

so I was in a bit of a rush so I tested an alteration of the code and that seemed to solve the problem.

I edited /perch/core/lib/PerchFieldType.class.php line 71

Before:

 public function __construct(PerchForm $Form=null, PerchXMLTag $Tag=null, $app_id)

After:

 public function __construct(PerchForm $Form=null, $Tag=null, $app_id)

without this edit to the core I can't update my events, so I'll have to roll back a version of the perch core. I have a backup of this, but I don't know is there a repository of these versions somewhere ?

I hope this investigation helps with a future update ?

Dylan Rynhart

Dylan Rynhart 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report - you should have been asked for this when creating the thread.

Hi Rachel, Sorry I only spotted your reply today. Yeah, I can't get a Diagnostics Report, because the page wouldn't work, I was only getting a 500 error, hence the PHP error above. I'm not sure that helps though. Sorry !

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you still unable to log into Perch?

Oh no, I could log in, I could see the list of events, but if I went to edit one of them the page wouldn't load. it's only the page: perch/addons/apps/perch_events/edit/... that didn't work ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

But you can get to the diagnostics report in Settings, is that right?

I'm so sorry ! I thought you meant the debug output here it is:

Perch is up to date PHP 5.5.32 is up to date MySQL 5.5.48 is up to date Image processing available SUMMARY INFORMATION

Perch: 2.8.29, PHP: 5.5.32, MySQL: 5.1.73, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_events (1.9.2), perch_forms (1.8.3), perch_gallery (2.8.6), perch_members (1.3) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_events', //'perch_members', 'perch_gallery' ); PERCH_LOGINPATH: /perch PERCH_PATH: /var/****/perch PERCH_CORE: /var/****/perch/core PERCH_RESFILEPATH: /var/****/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 32M, Max POST 32M, Memory: 256M, Total max file upload: 32M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes HTTP_HOST: listen.ie DOCUMENT_ROOT: /var/****/listen.ie REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, thanks.

Your modification is patching over the symptom but not the cause, so I wouldn't recommend pushing that to production. We'll take a look at the Events app and see what can be done.

I thought as much. I'm sorry I don't know enough about PHP objects or whatever they are called to be more help. All the best Dylan