Hi,
when I try to create a new flagging collection, I get the following error message (Drupal 9):

Error: Call to a member function isSyncing() on null in flag_lists_actions_flagging_collection_presave() (line 71 of modules/contrib/flag_lists/modules/flag_lists_actions/flag_lists_actions.module).

Any idea?

Thanks for support!

Issue fork flag_lists-3257955

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

filburt created an issue. See original summary.

beatrizrodrigues’s picture

Assigned: Unassigned » beatrizrodrigues

beatrizrodrigues’s picture

Assigned: beatrizrodrigues » Unassigned
Status: Active » Needs review

Here's a MR that I think will fix that. Please, review.

filburt’s picture

Wow, thank you for your quick response!

I can confirm that it fix the issue.

victoria-marina’s picture

Assigned: Unassigned » victoria-marina
sl27257’s picture

I agree that is was a quick fix. I was on lunch :)

Thank you for the diff!

The question is however why the flag isn't there. I should be... This is on -rc2. I wonder if it has a relation to #3200737: make the related_flag id unique ? It seems like something is not working with the update that fixes the names. May I ask what you where doing? Was it during the upgrade or something else?

/Thomas

filburt’s picture

Hi,

In my case it was a fresh install of flag and flag-lists modules on an existing Drupal website which I updated from D8 to D9 before (flag and flag lists were never installed before). Nothing changed in the default settings besides that I attached all the things to a given content type...

Hope it helps.

Thanks for suppport.

victoria-marina’s picture

Assigned: victoria-marina » Unassigned
Status: Needs review » Reviewed & tested by the community

I've installed the module, reproduced the issue, applied patch and saw changes. Tested again with patch and the error was gone.

sl27257’s picture

Thanks for your reports! It seems like your cases have nothing to do with an upgrade...

/Thomas

sl27257’s picture

Now I managed to create it!

BR

/Thomas

sl27257’s picture

Assigned: Unassigned » sl27257
FileSize
1.64 KB

The super quick fix is to uninstall the "Flag Lists Actions" sub-module, unless you really need it.

The full fix is attached. Please try it out and see if it is working. The fix is doing most of the job. There might be some tweak to make sure it is called for the right cases.

As the bug might have caused some missing actions the easiest way to restore them is to uninstall the "Flag Lists Actions" sub-module and then install it again. All actions will first be removed and then restored.

sl27257’s picture

Status: Reviewed & tested by the community » Needs review

  • sl27257 committed f05491c on 4.0.x
    Issue #3257955 by beatrizrodrigues, sl27257: Error: Call to a member...
sl27257’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.