Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The login code throws a PHP notice:
Notice: A session had already been started - ignoring session_start() in drupal_session_start()
I'll fix this in the 2.x-dev and provide a patch shortly.
Comment | File | Size | Author |
---|---|---|---|
#13 | simple_fb_connect-fix_for_php_notice-2326615-13.patch | 664 bytes | GiorgosK |
#4 | simple_fb_connect-fix_for_php_notice-2326615-4.patch | 652 bytes | kutergin.viktor |
Comments
Comment #1
masipila CreditAttribution: masipila commentedPatch attached, please review and test.
Comment #2
masipila CreditAttribution: masipila commentedHmm... It seems that we are still getting the notices so the patch does not fix that... Any ideas what causes the notice?
Comment #3
masipila CreditAttribution: masipila commentedAdditional information: the session_destroy() and drupal_session_start() in this patch is causing subsequent graph api calls to fail. We definitely should not commit this change.
Comment #4
kutergin.viktor CreditAttribution: kutergin.viktor commentedYou can try this patch.
Comment #5
masipila CreditAttribution: masipila commentedSuccesfully tested patch #4. Thank you!
Comment #8
saitanay CreditAttribution: saitanay commentedThe patch causes the login to go into a redirection loop.
with the patch on
returns a 0, causing the module to think FB auth hasnt happened and redirects the user to FB again and hence causing the loop.
Comment #10
masipila CreditAttribution: masipila commentedI'm not able to reproduce the login redirect loop with patch #4.
Here are my latest experiments from today:
Here's how I tested that $facebook->getUser() returns expected value. I have a block. The following part is returning block content.
When I viewed the block, the code above returned my FB user id.
Conclusion, patch #4 seems to work perfectly for me.
@saitanay, it looks like you have committed this to 7.x-1.x. It might well cause a redirect loop over there because the patch is written against 7.x.-2.x which is very much different from 7.x.-1.x. Please test patch #4 against the lates 7.x.-2.x-dev once more and if you get the same results as I did, please commit to 7.x-2.x-dev
Cheers,
Markus
Comment #11
masipila CreditAttribution: masipila commentedComment #12
masipila CreditAttribution: masipila commentedAnd just to add: I'm not planning to participate in debugging the 7.x-1.x branch since I find the login function of 7.x-1.x impossible to read. That's why I did refactored the login function to the 7.x.-2.x. in the first place :)
What I suggest as next steps is that
1) we get this PHP notice issue nailed --> please test this once more
2) we get #2326621: Add configuration option: use username or real name tested --> this has been waiting for testing by community for a while now
3) then release a 7.x-2.0-beta1 for wider community testing
4) if no new bugs are found from the beta, then we release 7.x-2.0 and phase out 7.x-1.x branch
D7 development can then continue from the 7.x-2.x
Cheers,
Markus
Comment #13
GiorgosKStill active on 1.x branch
I don't know if the maintainer has plans to move to 2.x branch but 1.15 has to be patched
here is a patch basically patch same as #4 but line numbers have changed
the patch is actually trivial and since its been tested from other users it is still review and tested and ready to commit
Comment #14
GiorgosKComment #16
masipila CreditAttribution: masipila as a volunteer commentedCleaning up the issue queue from the old 7.x-1.x issues. I'm not sure if this issue was eventually fixed in 7.x-1.x but this issue is not present in 7.x-2.x.