Forum
Events App admin - Fatal PHP error
I have the Events App installed. When I click on an individual event under 'Listing Events', I get a fatal PHP error.
PHP error:
Fatal error: Uncaught TypeError: Argument 2 passed to PerchFieldType::__construct() must be an instance of PerchXMLTag, instance of PerchRepeater given, called in /Users/matthewsanchez/Dropbox/narf-local/perch/core/lib/PerchFieldTypes.class.php on line 66 and defined in /Users/matthewsanchez/Dropbox/narf-local/perch/core/lib/PerchFieldType.class.php:71 Stack trace: #0 /Users/matthewsanchez/Dropbox/narf-local/perch/core/lib/PerchFieldTypes.class.php(66): PerchFieldType->__construct(Object(PerchAPI_Form), Object(PerchRepeater), 'content') #1 /Users/matthewsanchez/Dropbox/narf-local/perch/addons/apps/perch_events/modes/edit.pre.php(35): PerchFieldTypes::get('PerchRepeater', Object(PerchAPI_Form), Object(PerchRepeater), Array) #2 /Users/matthewsanchez/Dropbox/narf-local/perch/addons/apps/perch_events/edit/index.php(20): include('/Users/matthews...') #3 {main} thrown in /Users/matthewsanchez/Dropbox/narf-local/perch/core/lib/PerchFieldType.class.php on line 71
I think this started happening after I updated from Perch 2.8.24 to 2.8.28. The Events App was working fine before the update.
Diagnostics
HEALTH CHECK
Perch is up to date
PHP 7.0.0 is up to date
MySQL 5.5.42 is up to date
Image processing available
SUMMARY INFORMATION
Perch: 2.8.29, PHP: 7.0.0, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 7e72f9690b1498a1bead7a637c33a831c0d2f655 $, with PDO
Server OS: Darwin, apache2handler
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)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_events', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/matthewsanchez/Dropbox/narf-local/perch
PERCH_CORE: /Users/matthewsanchez/Dropbox/narf-local/perch/core
PERCH_RESFILEPATH: /Users/matthewsanchez/Dropbox/narf-local/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: localhost:8888
DOCUMENT_ROOT: /Users/matthewsanchez/Dropbox/narf-local
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Thanks, Matt
Hi Matt
please post your page and template code for the event.
event.php:
event_detail.html
Since Perch doesn't support repeating events, I've been updating the event dates by hand every weekend (there's about 6 events that take place once a week.) This might not be the most efficient thing to do but it was all I could think of when I first set up the site.
We'll take a look!
Since the PHP error mentioned something about
PerchRepeater
I removed all the<perch:repeater>
tags from event.html. This solved the problem and I was able to access the admin panel for individual events afterwards.Hi Dylan
please start a new thread if you need help rather than jumping onto someone elses, we can't help two people at once so you are likely to get missed!
When posting don't forget to include your Diagnostics Report and template or other relevant code.
Rachel
We also can't support anyone who has edited Core Perch code, so we would rather this was not posted to the forum. Please remember that we can only offer support if you have not edited Perch Core as once you have done that we are not supporting our code any more, and you are leaving yourself with a copy up Perch that can't easily be upgraded.