Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An anonymous user must be identifed by session ID: FLAG compatibility issue #102

Open
adarshkhatri opened this issue Jun 23, 2017 · 4 comments

Comments

@adarshkhatri
Copy link

There is code changes on Flag modules and it's throwing error for anonymous users.

The website encountered an unexpected error. Please try again later.
LogicException: An anonymous user must be identifed by session ID. in Drupal\flag\FlagService->getAllEntityFlaggings() (line 194 of modules/flag/src/FlagService.php).

Drupal\flag\FlagService->getAllEntityFlaggings(Object, Object) (Line: 24)
message_subscribe_email_flag_action_access('flag', Object, Object, Object)
call_user_func_array('message_subscribe_email_flag_action_access', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('flag_action_access', Array) (Line: 175)
Drupal\flag\FlagType\FlagTypeBase->actionAccess('flag', Object, Object, Object) (Line: 314)
Drupal\flag\Plugin\Flag\EntityFlagType->actionAccess('flag', Object, Object, Object) (Line: 145)
Drupal\flag\Plugin\Flag\UserFlagType->actionAccess('flag', Object, Object, Object) (Line: 355)
Drupal\flag\Entity\Flag->actionAccess('flag', Object, Object) (Line: 98)
Drupal\flag\ActionLink\ActionLinkTypeBase->getAsFlagLink(Object, Object) (Line: 23)
Drupal\flag\Plugin\ActionLink\AJAXactionLink->getAsFlagLink(Object, Object) (Line: 48)
Drupal\flag\FlagLinkBuilder->build('user', '1', 'email_user')
call_user_func_array(Array, Array) (Line: 356)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 151)
Drupal\Core\Render\Renderer->Drupal\Core\Render{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 152)
Drupal\Core\Render\Renderer->renderPlain(Array) (Line: 166)
Drupal\Core\Render\Renderer->renderPlaceholder('callback=flag.link_builder%3Abuild&args[0]=user&args[1]=1&args[2]=email_user&token=GCdGR5FCVqLIzAYH2-ME7D7hVeeb5zSHsC4ULIdn5iY', Array) (Line: 698)
Drupal\big_pipe\Render\BigPipe->renderPlaceholder('callback=flag.link_builder%3Abuild&args[0]=user&args[1]=1&args[2]=email_user&token=GCdGR5FCVqLIzAYH2-ME7D7hVeeb5zSHsC4ULIdn5iY', Array) (Line: 552)
Drupal\big_pipe\Render\BigPipe->sendPlaceholders(Array, Array, Object) (Line: 305)
Drupal\big_pipe\Render\BigPipe->sendContent(Object) (Line: 112)
Drupal\big_pipe\Render\BigPipeResponse->sendContent() (Line: 374)
Symfony\Component\HttpFoundation\Response->send() (Line: 20)

You may check this discussion on Drupal Flag.

@adarshkhatri adarshkhatri changed the title An anonymous user must be identifed by session ID An anonymous user must be identifed by session ID: FLAG compatibility issue Jun 23, 2017
@jaarong
Copy link

jaarong commented Aug 8, 2017

I'm running into this as well. After enabling the email users flag, I can no longer create a new account with an anonymous user.

@dpi
Copy link

dpi commented Aug 30, 2017

Im getting this when attempting to run the cores' search indexing cron job.

Core now refuses to index anything since this exception is thrown on each run.

flag-8.x-4.0-alpha2
message_subscribe-8.x-1.0-beta4

@dpi
Copy link

dpi commented Aug 30, 2017

stack

hdpe added a commit to hdpe/message_subscribe that referenced this issue Oct 5, 2017
@oriole9g
Copy link

oriole9g commented Feb 15, 2018

I confirm that this commit fixes the problem, flag module has changed her API.

It would be great if we update the code in Drupal module: https://www.drupal.org/project/message_subscribe, no only the GitHub version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants