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.
Notice: Trying to get property of non-object in user_access() (line 808 ofd7/modules/user/user.module).
I get the above error once I enable commerce_backoffice_content
Comment | File | Size | Author |
---|---|---|---|
#8 | commerce-backoffice-content-user-error-krumo.png | 52.14 KB | hkovacs |
#4 | [user-set-check]-[2672032]-[3].patch | 414 bytes | rajeev_drupal |
Comments
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #3
rajeev_drupal CreditAttribution: rajeev_drupal commentedComment #4
rajeev_drupal CreditAttribution: rajeev_drupal commentedThis issue is in user module not in Commerce Back-office. I have applied a patch in user module.
Comment #5
rajeev_drupal CreditAttribution: rajeev_drupal commentedComment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedBut I was user 1 when I got the error.
Comment #7
mglamanThis is a generic error your menu router gets corrupt by a bad [insert a magical word here]. You're likely not being passed an object, which is why the
isset
works.Can you please post a stacktrace so we can track it down? I have had this happen and would love to know is this is the module causing it.
Comment #8
hkovacs CreditAttribution: hkovacs as a volunteer commentedHey Matt,
I get same error after enabling commerce_backoffice_content.
Since this is caused by the backoffice module, I thinks it is best not to hack the core user module and best to figure this out.
Seems related to:
https://www.drupal.org/node/1923938
and
https://www.drupal.org/node/1894586
which has a nice screenshot
https://www.drupal.org/files/My_Commerce_Backoffice%20issue_00.png
I am attaching a screenshot of krumo expanded on the error item.
Let me know if you need anything else.
Comment #9
hkovacs CreditAttribution: hkovacs as a volunteer commentedI just found this which seems related and useful https://www.drupal.org/node/1780004#comment-7849775
Comment #10
mglamanComment #11
mglamanSo the issue seems to be an active view with duplicate path per https://www.drupal.org/node/1780004#comment-10393993.
Comment #12
hkovacs CreditAttribution: hkovacs as a volunteer commentedyeah, actually found this comment #29 in the same issue https://www.drupal.org/node/1780004#comment-7682701
so it is indeed an odd one.
so obviously this stems from views, but seems specifically admin_views. and from everything i have read it seems to be an issue when two view use the same path? which other backoffice issues have patched,
i ran the query mentioned in link comment my #9 and result:
so i grepped and found:
so it seems to me that the fn here is not going far enough:
i will delve further after lunch.
plz let me know your thoughts.
Comment #13
mglamanWeird. I wonder if we have to do an
unset
and actually prevent the View from being registered, even if deleted.Comment #14
hkovacs CreditAttribution: hkovacs as a volunteer commentedwhere and what would you like me to test?
Comment #15
hkovacs CreditAttribution: hkovacs as a volunteer commentedI just tested this:
disabled module, enable module, cleared all cache.
still throwing errors.
Comment #16
hkovacs CreditAttribution: hkovacs as a volunteer commentedinteresting... i just reran the query from above while the values are unset and now i have 3 results:
Comment #17
hkovacs CreditAttribution: hkovacs as a volunteer commentedok, here's an idea which makes this a views issue and not a backoffice issue:
perhaps the patch in #29 here https://www.drupal.org/node/1771140#comment-10140846 (https://www.drupal.org/files/issues/views_access_arguments-1771140-29.patch) should check if $account is an object.
since the error is
it makes sense to me that views should verify this first.
i will cross post?
Comment #18
hkovacs CreditAttribution: hkovacs as a volunteer commentedi just did a bunch of testing on the views file per the above mentioned fn and the error wont go away, so disregard my theory in #17.
Comment #19
GoddamnNoise CreditAttribution: GoddamnNoise at Karakana Factoría TIC commentedI've just found the same problem after installing latest version of the Commerce Backoffice module.