neatlinefeatures bug or Omeka upgrade issue

We are testing an upgrade from Omeka 1.5.3 to 2.1.4 and at the same time we have upgraded several plugins. The server has been upgraded from NeatlineFeatures 1.1.0 to NeatlineFeatures 2.0.2. I am seeing these errors every time I edit an item in the admin side:

PHP Notice: Undefined index: text in projects/omeka/application/models/Mixin/ElementText.php on line 549, referer: https://omekadev.xxx.yyy.edu/admin/items/edit/3069
PHP Notice: Undefined index: text in projects/omeka/plugins/NeatlineFeatures/models/Table/Table_NeatlineFeature.php on line 344, referer: https://omekadev.xxx.yyy.edu/admin/items/edit/3069

Has anyone seen something like this before? I'm not sure if the errors are appearing because of an upgrade process with Omeka or NeatlineFeatures that has corrupted the database. Or if this may simply be a bug with the plugin even though I'm not specifically trying to use the plugin when the error is happening.

At first glance I suspect this isn't a corrupt database thing, but it's definitely odd. It looks like, when saving, not all of the data that should be sent to the server is arriving as it should. The first notice comes from where Omeka processes the submitted text, and for some element, the text isn't arriving.

Does this happen both when you edit and add items? And, does it also happen when you add and edit collections?

The same error occurs if I create a new item. I'm not seeing this error when creating or editing a collection.

(The site seems to be working okay. I just noticed the errors when debugging our homegrown theme.)

Since you thought some data was getting lost when sent to the server. I decided to create an item and fill in every field. I think I have discovered the problem. I have a non-existent Coverage input field. The label and descriptive text and checkbox appear on the entry form. But the textarea box for entering data for the Coverage is not appearing. The Coverage field is appearing in the Collection data entry.

Any thoughts on why the Coverage input field would not appear? I just tried changing browsers and still have the same issue.

I tried a third browser and still the same issue. So then I decided to click on the Add Input to see if a new instance of the field would display. But that generates this set of errors in the log and on the UI above the Coverage field:

PHP Notice: Undefined index: text in projects/omeka/application/models/Mixin/ElementText.php on line 549, referer: https://omekadev.xxx.yyy.edu/admin/items/edit/3086
PHP Notice: Undefined index: mapon in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 484, referer: https://omekadev.xxx.yyy.edu/admin/items/edit/3086

Ah! I was was going to suspect something weird with one of the elements. I'm surprised that it's only happening in items and not collections because the same code creates all the element inputs for both of them.

If you go to Settings->Element Sets->Dublin Core, does Coverage show up in that list the same way the other elements do?

Yes it does.

Hi,

It looks like it's probably the Coverage element, which NeatlineFeatures does strange things with. Unfortunately, I've been unable to reproduce this problem myself, but hopefully we can figure it out anyway.

When you edit it and immediately save the edit without changing anything, do you still get the error?

Also, what exactly is in this coverage fields for these? Just text, or text + map?

Thanks,
Eric

When I edit and save with no changes the errors still occur. In the instance of creating a new item, there's nothing in the Coverage field because it cannot be populated without the textarea (and if I look in the MySQL DB, there is no record for that item ID/element ID combo in the _elements_text table. I searched in the MYSQL DB and identified 12 items with Coverage populated. When I browse it looks like the record I'm examining has both text and a map. If I edit the record I get several errors:

PHP Notice: Trying to get property of non-object in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 607, referer: https://omekadev.xxx.yyy.edu/admin/items/show/2377
PHP Notice: Trying to get property of non-object in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 608, referer: https://omekadev.xxx.yyy.edu/admin/items/show/2377
PHP Notice: Trying to get property of non-object in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 609, referer: https://omekadev.xxx.yyy.edu/admin/items/show/2377
PHP Notice: Trying to get property of non-object in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 610, referer: https://omekadev.xxx.yyy.edu/admin/items/show/2377
PHP Notice: Trying to get property of non-object in projects/omeka/plugins/NeatlineFeatures/lib/NeatlineFeatures/Utils/View.php on line 611, referer: https://omekadev.xxx.yyy.edu/admin/items/show/2377

After some testing with Eric in the Scholar's Lab, it looks like this is an issue with using https protocol and Neatline < https://github.com/scholarslab/Neatline/issues/313 >. To have a functional Coverage field, the temporary solution is to disable Neatline.