Forum

Thread tagged as: Problem, Error

Empty Collection Item PHP Error

Hey,

Getting the following when there's empty item in a collection (e.g. when clearing all items in collection, it adds an empty item).

Notice: Undefined index: _id in /perch/core/runway/apps/content/modes/collection.items.post.php on line 131

Perch Runway: 3.1.2, PHP: 7.2.7, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO Server OS: Darwin, apache2handler Installed apps: content (3.1.2), assets (3.1.2), categories (3.1.2), perch_forms (1.12) App runtimes: <?php $apps_list = [ 'perch_forms' ]; PERCH_LOGINPATH: /perch PERCH_PATH: /perch PERCH_CORE: /perch/core PERCH_RESFILEPATH: n/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 8M, Memory: 128M, Total max file upload: 8M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: bahlsen.localhost DOCUMENT_ROOT: /Builds/ REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Ryan Gittings

Ryan Gittings 1 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does it go away when you add your item back?

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

It does, yes!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok great. Do you commonly empty a collection of all its items, rather than just deleting and recreating it?

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

I don’t commonly, it’s just a bug that exists and not nice for the end user to see that’s all.