backdrop-contrib / faqfield

This module provides a field for frequently asked questions.
GNU General Public License v3.0
0 stars 0 forks source link

TypeError when editing FAQ field content #6

Closed olafgrabienski closed 1 month ago

olafgrabienski commented 1 month ago

Testing the current release 1.0.2, I've encountered an issue when editing FAQ field content.

Steps to reproduce:

  1. Add a FAQ field to a content type.
  2. Keep the default settings.
  3. Add a content item, put something in the FAQ field, and save the item.
  4. Try to edit the content item.

Result: You see a blank page with the message "Cannot access offset of type string on string".

The whole message in DBlog:

TypeError: Cannot access offset of type string on string in faqfield_field_widget_form() (line 442 of modules/faqfield/faqfield.module).

olafgrabienski commented 1 month ago

I've edited the steps in the issue description (added step 2).

laryn commented 1 month ago

The patch in the issue I linked in the other thread may be useful:

https://www.drupal.org/files/issues/faq-display-default-values-using-paragraph-module-4.patch

olafgrabienski commented 1 month ago

I've edited the issue description again and changed the title as well. The issue looks quite serious, as it appears not only with default field values but generally when editing FAQ field content.

alanmels commented 1 month ago

Thanks for letting me know. I'll take a look at this later today.

olafgrabienski commented 1 month ago

Thanks for the fix, @alanmels! Tested it only now, and it works for me.