I just updated my Ubuntu server and I kept a blank page in Drupal with this message:
The website encountered an unexpected error. Please try again later.
What should I do ?
Type php
Date Mardi, 23 juillet, 2019 - 01:25
User administrateur
Emplacement https://www.example.com/fr/article
Référent
Message Drupal\Core\Database\DatabaseExceptionWrapper : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'member ON member.entity_id = thread.id AND member.members_target_id = '1' JOIN g' at line 1: SELECT COUNT(DISTINCT thread.id) FROM {private_messages} AS message JOIN {private_message_thread__private_messages} AS thread_message ON message.id = thread_message.private_messages_target_id JOIN {private_message_threads} AS thread ON thread_message.entity_id = thread.id JOIN {private_message_thread__members} AS member ON member.entity_id = thread.id AND member.members_target_id = :uid JOIN {private_message_thread__last_access_time} AS last_access ON last_access.entity_id = thread.id JOIN {pm_thread_access_time} as access_time ON access_time.id = last_access.last_access_time_target_id AND access_time.owner = :uid AND access_time.access_time <= thread.updated WHERE thread.updated > :timestamp AND message.created > :timestamp AND message.owner <> :uid; Array ( [:uid] => 1 [:timestamp] => 1563519558 ) dans Drupal\private_message\Mapper\PrivateMessageMapper->getUnreadThreadCount() (ligne 266 de /var/www/www-example-com/web/modules/contrib/private_message/src/Mapper/PrivateMessageMapper.php).
Severity Erreur
If I disable the Private Message notification block, the site works.
Comments
Comment #2
zenimagine commentedComment #3
zenimagine commentedI am currently in version 8.0.17 which does not work with private message. I need to go back to version 8.0.16 for not having this bug.
Comment #4
ravi.shankar commentedThis patch will fix this issue.
Comment #5
anmolgoyal74 commentedzenimagine
In the latest release of MySQL version 8.017, "member" is now a reserved keyword. Please review the patch.
Thanks Ravi for the patch.
Comment #6
zenimagine commentedThank you, but impossible to apply the patch :
Comment #7
phjouOk did the patch on the dev branch, tell me if it applies. I didn't test it.
Comment #8
zenimagine commented@phjou Great, thanks, it works
Comment #10
anmolgoyal74 commentedThanks for the patch.
Comment #12
bajah1701 commentedFor some reason this patch didn't work for me. It says "Cannot apply patch"
Comment #13
bajah1701 commentedFigured out why the patch didn't work. Apparently the maintainer added most of the changes made in the patch except the last one. line 254 still says member, whereas all the others were changed.