Open laryn opened 4 years ago
Hi @laryn. Long time for my reply, but I'll try to keep up with the maintenance of this module.
I agree that it would be nice to fast-forward the backdrop release to mimic the drupal one. I will do so in the next release.
Also, I created a PR to catch up with the drupal module release of September 6 2019. Would you like to review it? Thanks!!
@robertgarrigos Sounds good.
I looked at the PR and it seems that the format settings for a View Field are not saving correctly for me. If I check the boxes for "view name", "display", and "arguments" and then click "Update" on the field format settings, the summary shows correctly -- but if I then click "Save" on the "Manage Displays" page, it reloads the page with no boxes checked on these settings in the Viewfield.
This is in the log:
Warning: Undefined array key "fields_to_display" in viewfield_field_formatter_settings_form() (line 142 of /var/www/html/web/modules/contrib/viewfield/viewfield.module).
Warning: foreach() argument must be of type array|object, null given in form_type_checkboxes_value() (line 2448 of /var/www/html/web/core/includes/form.inc).
Thanks, @laryn, I'll take a look
@laryn, cannot reproduce this. I installed the module, created a new viewfield and could check-uncheck boxes at pleasure. The setting was saved every time I saved the display.
I fixed one thing, though: there was no summary when unchecking all the options (view name, display and arguments) thus no config button shown when saving the display. You had to save the default format and then set again the field values. This is fixed with the latest change to the PR.
@robertgarrigos - I've reproduced the issue @laryn experienced and suggested a fix on the PR
@robertgarrigos I've done some testing with @yorkshire-pudding suggestion on your PR and it seems to do the trick.
EDIT: I'm not sure the new settings are saving correctly. I'll keep testing and report back.
I think what's confusing is that the "Information to list" options are showing up even if the field formatter type is "Default" -- and even though they show up they aren't saving correctly. If I'm understanding correctly, shouldn't we hide those field formatter settings unless $display['type'] == 'viewfield_field_values'
?
added @yorkshire-pudding suggestion to fix the php warnings to the pr. @laryn, want to try out?
I saw there was a new release on the Drupal module: https://www.drupal.org/project/viewfield
It would be good to keep this current, and also to clean up the releases/tags (removing Drupal releases), and maybe to fast-forward the Backdrop release number to track with the Drupal version. For example, is the Backdrop version equivalent to Drupal 7.x-2.x or 7.x-3.x?