I see a very similar issue here: https://www.drupal.org/project/flag_lists/issues/3163684

The difference in my case is that nothing flag related at all shows in the Manage Display configuration pages for any of the enabled content types.

Using this image from issue 3163684 image

I have nothing that says "flag."

Edit: Forgot to mention: I do have the My Flagging Collections menu item at /flagging_collection
Using a previously created flag, I was able to change it to a template and get some flagged nodes to show up on that page and in the sidebar block.
But I have yet to figure out how to get a link to appear in the sidebar block. There does not appear to be anything in the block configuration for enabling a link.
So at this point I have a single Ajax link on nodes that flags, but it doesn't allow the user to identify which collection to add it to... and as previously mentioned, no tabs and no display options in Manage Display.

(Drupal 9.2.4, as user1, all permissions verified)

Comments

aharown07 created an issue. See original summary.

aharown07’s picture

Issue summary: View changes
sl27257’s picture

Hi,

l need to look into this. I am not sure yet though, that I full understand the issue. One thing is the following:

"Using a previously created flag, I was able to change it to a template and get some flagged nodes to show up on that page and in the sidebar block."

This doesn't sound good to me. Are you sure the Template flag was correctly created? Did you follow this:

https://www.drupal.org/docs/contributed-modules/flag-lists/add-a-flag-li...

BR

/Thomas

aharown07’s picture

Thanks, Thomas.

More detail: Before I installed flag_lists, I installed flag and created a flag called Research Folder.
After installing flag_lists, I added another flag from the included template.

With the first flag, I was able to display the Ajax link on nodes etc., and flag/unflag successfully.

After I added flag_lists, I wasn't seeing any Ajax link or tab on /user or link in the sidebar block or flag_list options in Manage Display for user or content types.

To see what would happen, I edited the configuration for the Research Folder flag and set it to be a flag lists flag--or at least that's what I though I was doing.

Flagged items using Research Folder then showed up in the sidebar block, but still no tab at /user or link in the block, or flag_list items in Manage Display for user/content types.

I decided to uninstall, reinstall and rebuild the flag_list flags and see if things are more clear to me.

Part of what's confusing in Flag module world is language. A "flag" might be an entity type ("bundle"?) or, in another context it might refer to the flag set on a node or user ("flaggings"?). And I was initially confused by "template," but understand now that it's a collection of parameters for a "flag" (in the first sense . . . I don't have a better idea for the language difficulties, but in the solution I'm trying to build, there will eventually be Folders, which are the "flags" users will select when marking a piece of content for collection. So flagged pieces of content will be collected in Folders (which are really "flags" that relate to "flaggings"... if I correctly understand what's actually happening.)

aharown07’s picture

Reinstalled, followed steps at https://www.drupal.org/docs/contributed-modules/flag-lists/add-a-flag-li...

I named the new flag Research Folder - Content.

Results:

  • I now see both "Flag list template 1" and "Research Folder - Content" in the Manage Display settings for the content types.
  • Links for flagging do not appear on nodes in default view (verified enabled in settings)
  • No tab appears in /user
  • The My Flag List Items page and block appear but have no items (as expected).
  • The My Flag List Items block doesn't have any link

Edit: I'm using an Adaptive2 subtheme but when I switch back to Bartik I have the same results (all caches flushed).

Detail that may be important: If I created a standard flag with Ajax link, it appears on nodes as expected. If I then edit that new flag and check the flag list template checkbox, it stops appearing where it did previously. I was going to uncheck it again and see what that would do, but after checking and saving the checkbox is disabled and can't be unchecked.

sl27257’s picture

Let me try to re-create what you have done here! That is by creating flags before the flag_lists module is installed. But in general this is probably not a good idea.

I see you are using rc1 of flag_lists. Which version of flags are you using?

Which options have you chosen when you create the flag_lists template?
Both pages please, first which entities it is used for and then the second page with all the options. (The one with the Flag_lists tick box at the bottom.)

Regarding the naming I do agree that it might be confusing. One part is from the old flag_lists module and one is from the new way with entities etc. I have done some work to try to clean it up but maybe more is needed?

aharown07’s picture

Flag version is 8.x-4.0-beta2

I removed all my flags before reinstalling flag_lists, but I didn't do an uninstall+reinstall of Flag. So that might be worth trying. I'm never 100% confident that nothing is left behind.

About 'naming,' I have some ideas, but will think on it some more then probably post them as a separate issue. To fully clear up the language, I think the maintainer(s) of Flag may need to get involved also. (It may actually make sense to open the issue there first.)

aharown07’s picture

I did a complete uninstall of both flag and flag_lists, then reinstalled both.

I created a flag called "test" (per instructions)

I'll list parameter details below, but initial results: No tab in /user and no link in the sidebar block.

However, I discovered a stop I'd missed before: went to /flagging_collection using the navigation menu link and created a "flagging collection" using the "Template flag" called Test. The link for this flag does now appear on full node view of selected content types.

Config details:
At "Add flag" ...
Flag type: Content

At admin/structure/flags/manage for the flag...
Label: Test
Scope: Personal
Messages:
Flag link text: Add to test folder
Flag link description:
Flagged message: Successfully added
Unflag link text: Unflag this item
Unflag link description:
Unflagged message: Successfully removed
Flag access:
Unflag not allowed text: [none]
Expose additional permissions: [unchecked]
Flaggable types: a single content type called Resource
Display options:
Display link as field: checked
Display checkbox, Display in contextual links: unchecked
Display in entity links: only full content view mode checked
Link type: AJAX
Flagging collection template: Checkbox by "Flagging Collection Template"

When I go to admin/structure/flags now I get a WSOD "The website encounted an unexpected error. Please try again later.

Log shows error below. I've replaced part of my path with [..]

Error: Call to undefined method Drupal\user\Entity\User::getUsername() in Drupal\flag_lists\FlagListsFlagListBuilder->buildRow() (line 111 of [...]/web/modules/contrib/flag_lists/src/FlagListsFlagListBuilder.php)
#0 [...]/web/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php(126): Drupal\flag_lists\FlagListsFlagListBuilder->buildRow()
#1 [internal function]: Drupal\Core\Config\Entity\DraggableListBuilder->buildForm()
#2 [...]/web/core/lib/Drupal/Core/Form/FormBuilder.php(532): call_user_func_array()
#3 [...]/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm()
#4 [...]/web/core/lib/Drupal/Core/Form/FormBuilder.php(219): Drupal\Core\Form\FormBuilder->buildForm()
#5 [...]/web/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php(94): Drupal\Core\Form\FormBuilder->getForm()
#6 [...]/web/core/lib/Drupal/Core/Entity/Controller/EntityListController.php(23): Drupal\Core\Config\Entity\DraggableListBuilder->render()
#7 [internal function]: Drupal\Core\Entity\Controller\EntityListController->listing()
#8 [...]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#9 [...]/web/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 [...]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#11 [...]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#12 [...]/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 [...]/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#14 [...]/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#15 [...]/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#16 [...]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#17 [...]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#18 [...]/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle()
#19 [...]/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#20 [...]/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#21 [...]/web/core/lib/Drupal/Core/DrupalKernel.php(717): Stack\StackedHttpKernel->handle()
#22 [...]/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#23 {main}
.

If it helps, some other details:
Drupal 9.2.7
PHP 7.4.3
nginx 1.18.0
0.3.31-MariaDB-0ubuntu0.20.04.1 - Ubuntu 20.04

sl27257’s picture

Great that you found a part of your problem!

Let me look into the dump you provided. Maybe this is not a "support request" any longer but a "bug report" :)

BR

/Thomas

sl27257’s picture

Category: Support request » Bug report

This is interesting. I am surprised that the "Upgrade status" module doesn't warn for this depreciated call!

sl27257’s picture

A patch!

sl27257’s picture

Status: Active » Needs review
sl27257’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » sl27257
aharown07’s picture

The patch took care of the error.
I'm still not seeing a tab in /user, but I've but a menu block there for the time being.

  • sl27257 committed 9a6dac6 on 4.0.x
    Issue #3243183 by sl27257, aharown07: No tabs, nothing in Manage Display
    
sl27257’s picture

May I ask what it is you are expecting to see under /user?

Any of the following:

https://www.drupal.org/docs/8/modules/flag-lists/menu-items-for-the-user

aharown07’s picture

It appears I misread something and had the impression that there should be a tab on the /user page. I think I prefer a sidebar block anyway (Tools menu etc) so no issue there.

Probably all that's left is "Further, you should enable the link to create lists in the block's config." I'm not seeing where to do that.

sl27257’s picture

Ops, sorry I missed your last comment. To place a block you use the "Block menu". I took this for granted as this is nothing special for the Flag Lists module. :( But I will add a short description on how to do it!

aharown07’s picture

Thanks. Know how to place blocks. The part I don't understand is "enable the link to create lists"... I haven't been able to find a link that enables lists.

sl27257’s picture

Hi,

I am sorry but I am not able to find the quoted text "enable the link to create lists" anywhere... :( I might be somewhere that I have overlooked!

aharown07’s picture

This is at https://www.drupal.org/project/flag_lists at the moment... though it's under the D7 instructions.

  • Enable the "list" block so that it is displayed on your content. The block will only be visible if the content is listable and the user has permission to create lists. That is, the node type must be assigned a template, or the block won't appear. Further, you should enable the link to create lists in the block's config.
  • Create new lists using the link in the block.

I'm probably misunderstanding that, but I don't see anything like that to enable in the block config.

sl27257’s picture

Aha, now I understand. This is related to the Block configuration in Drupal 7. At the top of the Block configuration page in Drupal 7 you have the "Block title". Below that there are 3 tick boxes marked:

  • Show link to add new list
  • Show edit and delete links
  • Include flag module flags

The comment refers to the first one of these three links. It is good to have that one ticked.

BR

/Thomas

aharown07’s picture

Understood. Thanks for the assist.

sl27257’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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