Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
visiting the user/1/view path gives:
* Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 108 of includes\entity.inc).
* Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 272 of includes\entity.inc).
* Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 1919 of includes\database\database.inc).
Comment | File | Size | Author |
---|---|---|---|
#15 | default_local_tasks_goto.patch | 1.97 KB | chx |
#14 | 716150_user_view_page_14.patch | 832 bytes | aspilicious |
#6 | 716150_user_view_page.patch | 1.59 KB | Cibes |
#5 | 716150_user_view_page.patch | 1.53 KB | Sivaji_Ganesh_Jojodae |
#3 | 716150_user_view.patch | 688 bytes | mcarbone |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedConfirm
Comment #2
aspilicious CreditAttribution: aspilicious commentedObject of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 1976 of C:\xampp\htdocs\drupal\includes\database\database.inc).
thats why...
Comment #3
mcarbone CreditAttribution: mcarbone commentedThe problem is the %user loads the whole object, and %user_uid_only_optional only loads the uid, and user_view_page is expecting only the latter. This simple patch fixes that problem, but now there's another one -- the local tab menu is being duplicated on user/1/view. There seems to be something odd going on with the underlying menu settings, and I'm not quite sure what it is.
Comment #4
BerdirSetting status to see if the patch still applies.
Comment #5
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented@mcarbone If
$uid
is user object then you don't have to run theuser_load()
again. Attached patch prevents redundantuser_load()
call and adds comment & changes argument $uid to $account.Now i don't see duplicate local tab menus because #755638: Tasks are duplicated for default local tasks is fixed.
Comment #6
Cibes CreditAttribution: Cibes commentedSolution works fine.
I rewrote the check a little bit - this seems more straight forward to me and can return "MENU_NOT_FOUND" in all ways.
Comment #7
mcarbone CreditAttribution: mcarbone commentedHmm, but now the local task tabs aren't appearing at all.
Comment #8
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented@Cibes Looks much better now.
@mcarbone
node/[nid]/view
doesn't shows local tabs either, may be we need to discuss that in a separate issue.Comment #9
mcarbone CreditAttribution: mcarbone commentedValid point. I'm not really sure of the purpose of this menu item then, but better that it's working if it's going to be there. This seems ready to go.
Comment #10
Dries CreditAttribution: Dries commentedMmm, that seems to be a bit of a hack, IMO.
Comment #11
aspilicious CreditAttribution: aspilicious commented#6: 716150_user_view_page.patch queued for re-testing.
Comment #12
aspilicious CreditAttribution: aspilicious commented*Retesting old patches*
Comment #14
aspilicious CreditAttribution: aspilicious commentedRerolled, even smaller patch due to fixed trailing whitespaces in an other patch
Comment #15
chx CreditAttribution: chx commentedWhat is the use case of typing in the default local task path? I do not get it. Nor does IMO Drupal work on those URLs. So let's redirect.
Comment #16
pwolanin CreditAttribution: pwolanin commentedI guess a redirect is ok, but in that case we don't even need access, etc for these since they cannot be accessed at all?
Comment #17
thurein CreditAttribution: thurein commented#3: 716150_user_view.patch queued for re-testing.
Comment #18
joachim CreditAttribution: joachim commentedThe relationship between a MENU_DEFAULT_LOCAL_TASK menu item and the tab group parent which shows it has always been mysterious and hard to grok. It looks like this change would alter that mysteriousness -- therefore, needs documentation.
Comment #19
jacquesboucar CreditAttribution: jacquesboucar commentedfailed
Comment #20
pwolanin CreditAttribution: pwolanin commentedComment #21
BrockBoland CreditAttribution: BrockBoland commentedI think this bug may have been fixed by some other change, because I can not replicate it on the 8.x HEAD. If nothing else, this patch needs to be re-rolled since it was created before the /core directory was created.
Comment #22
jhedstromThe errors in the IS no longer occur.
user/x/view
isn't even a route anymore from what I can tell.