Problem/Motivation

I want to let users add flags to their lists, on a views overview page.

Steps to reproduce

I've installed and configured flag lists. It is for example working as expected on a node page. But when I add the "Flag link" in Views, nothing is displayed.

Proposed resolution

It would be really useful if a field formatter is available for Views.

Is this not supported or am I missing something?

CommentFileSizeAuthor
#10 Bulkview.png76.41 KBsl27257
#6 Views_support-3259130-6.patch3.42 KBsl27257

Comments

sorson created an issue. See original summary.

sl27257’s picture

The support that is there is what you "get for free" so to speak plus some very minor additions like a specific field for a Bulk Form for Flagging collections. That might be what you are after? But I see that the API has change d from Drupal 8 to Drupal 9 and that need to be fixed...

Can you try to describe a little more in detail what you are trying to achieve, please?

sl27257’s picture

Assigned: Unassigned » sl27257
Category: Feature request » Bug report
sorson’s picture

I try to get a list of the "flagging collections" that a user has created. The same list (flag_list_flag) that is currently displayed on a node page.

I want to let the user add a content item to a list, by clicking on a flag link.

I've now implemented a work around by creating a "View mode" with only the flag list and a custom twig template. I add that rendered entity in views with the specific "View mode" selected. This shouldn't be needed, if there was just a Views field for it.

sl27257’s picture

That sounds like a "Bulk Form" to me. Maybe it is time for a documentation page on how to create a Bulk Form in views...

The fix due to the API change is on its way!

sl27257’s picture

StatusFileSize
new3.42 KB

This is the patch that is needed to fix the API update from Drupal 8 to Drupal 9. There is also a fix which is related to #3257955: 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). due to that there are other changes which I have not found the origin of as well.

To use this "Bulk form" you create a view of the node (entities) you want to be able to add to a Flagging Collection. I propose to select a "Table" view. To this you add a field of type "Flagging Collection operations". That should be it. Of course you can add other fields as needed.

  • sl27257 committed fa7daa3 on 4.0.x
    Issue #3259130 by sl27257: Views support
    
sorson’s picture

Thanks for your help and quick response. I really appreciate the hard work you've put in this great module.

The patch seems to work fine but my problem is not with the "Bulk update" view. ( I can create successfully a "Flagging" view with the "Bulk update" field etc.)

What I'm trying to achieve is to get a relationship between a "Content" view and "Flagging". This seems to be missing for Flag lists:

  1. I create a "Content" view
  2. I add a Title field (For example: to display a list of node titles)
  3. I now want to add a "Flag link" to let users flag these nodes
  4. When I try to add a "Relationship", the only possibility is to add a "Content Flag" where a specific Flag list needs to be selected with a radio button. (Limit results to only those entity flagged by a certain flag.) "Flag link" to display flag/unflag link is than only shown for this specific Flag list.
  5. I want to have a list of Flag lists of the current logged in user with flag/unflag links. This seems not possible in Views.

It is possible to add a "Flagging Collection operations" field (without any required other relationship) but this is a bulk action. I need to display separate flag/unflag list links for each title.

This field would make a lot things more easy and the whole system more flexible. I also don't think it is a good idea to interweave "flag collection" to things like "Content type" displays. This is not scalable if a lot of users create a lot of lists. This will crash probably the Manage display admin UI. Letting Views take care of this makes it much more scalable where users can decide what to display on Content types.

sl27257’s picture

OK, thank you for your nice comments and the clarification!

Let me look into it!

/Thomas

sl27257’s picture

StatusFileSize
new76.41 KB

I am sorry but I still do not understand what you want.

This is what a sample of a bulkview can look like. To me it has all things you are asking for?

Bulkview

sl27257’s picture

Now there is also a help page available.

Bulk view Flagging Collection help page

sl27257’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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