Closed argiepiano closed 7 months ago
@laryn, @hosef, PR provided and ready for testing and review.
I basically removed the comment
node property info definition from node.info.inc
, and modified the exiting comment
node property definition in comment.info.inc
to account for the fact that this property needs a select box with the three options for comments in Backdrop (open, closed, and closed & hidden).
Removing the property definition from node.info.inc prevents the fatal error that was reported above when the comment
module was disabled.
@argiepiano Tested and reviewed. LGTM so I will go ahead and merge.
We found this issue today while working with the Views Bulk Operations module. This also fixed our issue:
Error: Undefined constant "COMMENT_NODE_OPEN" in entity_plus_metadata_node_comment_settings_options_list() (line 137 of /home/wilbur/wbd/docroot/modules/entity_plus/modules/callbacks.inc).
Will this be added to a new release soon?
Thanks!
@laryn, @hosef, I think we should do a new release. Are you OK with that?
Originally reported on Zulip.
In certain conditions, for example, when using Views Bulk Operations, this error is thrown when:
The issue started with #149. (Mea culpa). The node property info
'comment'
should not be added at this point. In fact, that property info is correctly added in the functionentity_plus_metadata_comment_entity_property_info_alter()
in the filecomment.info.inc
, which runs only ifcomment
is enabled.149 was added as an attempt to allow for the three states of that property. In D7, this was a boolean (on/off). Now, in Backdrop, there are three possible states:
COMMENT_NODE_OPEN
,COMMENT_NODE_CLOSED
andCOMMENT_NODE_HIDDEN
.While the addition of these 3 states is correct, those should be have been as an
option list
callback inentity_plus_metadata_comment_entity_property_info_alter()
.PR submitted in a moment.