Hi,
I don't know yet why this is happening, but suddenly i have this error on saving nodes :

Error: Call to a member function id() on null in flag_lists_flag_action_access() (line 243 of /var/www/d8.materio.com/public_html/web/modules/contrib/flag_lists/flag_lists.module) #0 [internal function]: flag_lists_flag_action_access('flag', Object(Drupal\flag\Entity\Flag), Object(Drupal\Core\Session\AccountProxy), Object(Drupal\node\Entity\Node))
CommentFileSizeAuthor
#2 hook_flag_access_id_on_null_4.patch2.04 KBbachbach

Comments

bachbach created an issue. See original summary.

bachbach’s picture

StatusFileSize
new2.04 KB

here is a patch as a workarround
bug is a flag_collection doesnot have a related_flag
have to figure out why and how ...

sl27257’s picture

Hi,

thanks for the report!

I have seen the same error lately, during my work on #3200737: make the related_flag id unique. In these cases it has always been because I have had bugs in the implementation of the update from the old naming scheme to the new one.

So it would be good if you could figure out what originally caused the mismatch? Your fix of course work as a remedy to the error message you get. But I think there must not be a missing related flag in the first place what so ever.

sl27257’s picture

BTW: I always check the different table for what is found in these. Do you have the possibility to do that? It would be interesting to know if the following match:

SELECT relatedflag FROM flagging_collection_field_data;

and

SELECT name FROM config WHERE name LIKE 'flag.flag.%';

In the second case you will get more records but the end part of the name must match the records from the first. Also look out for NULL in the queries.

sl27257’s picture

Status: Active » Postponed (maintainer needs more info)
sl27257’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)