On a chat page, the "Enter" key does send the message with ajax.

But if you try to send a new message again without refreshing the page it just goes to the next line in the message box and the message is not sent with "Enter" key.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

RgnYLDZ created an issue. See original summary.

Djeka made their first commit to this issue’s fork.

artem_sylchuk made their first commit to this issue’s fork.

  • artem_sylchuk committed 75c36921 on 3.0.x authored by Djeka
    Issue #3322900 by Djeka, artem_sylchuk: "Enter" key does not work after...
artem_sylchuk’s picture

Status: Active » Fixed
Issue tags: +LutskGCW23
rgnyldz’s picture

Not sure if its relavent with this but after I updated to dev version I get WSOD on thread view page with the below message in logs;

ParseError: syntax error, unexpected ')', expecting variable (T_VARIABLE) in Composer\Autoload\includeFile() (line 144 of /home/keratai1/public_html/xxxxx.com/web/modules/contrib/private_message/src/Form/PrivateMessageForm.php) #0 /home/keratai1/public_html/xxxxx.com/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/keratai1/...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Drupal\\private_...')
#2 [internal function]: spl_autoload_call('Drupal\\private_...')
#3 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityType.php(482): class_exists('Drupal\\private_...')
#4 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityType.php(455): Drupal\Core\Entity\EntityType->hasHandlerClass('form', 'add')
#5 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityType.php(515): Drupal\Core\Entity\EntityType->getHandlerClass('form', 'add')
#6 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(206): Drupal\Core\Entity\EntityType->getFormClass('add')
#7 /home/keratai1/public_html/xxxxx.com/web/modules/contrib/private_message/private_message.module(160): Drupal\Core\Entity\EntityTypeManager->getFormObject('private_message', 'add')
#8 [internal function]: private_message_private_message_thread_view(Array, Object(Drupal\private_message\Entity\PrivateMessageThread), Object(Drupal\Core\Entity\Entity\EntityViewDisplay), 'full')
#9 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(426): call_user_func_array(Object(Closure), Array)
#10 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object(Closure), 'private_message')
#11 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(433): Drupal\Core\Extension\ModuleHandler->invokeAllWith('private_message...', Object(Closure))
#12 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(288): Drupal\Core\Extension\ModuleHandler->invokeAll('private_message...', Array)
#13 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(239): Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array)
#14 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build(Array)
#15 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#16 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#17 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#18 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#19 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render(Array, false)
#20 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#21 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#22 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#23 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#24 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#25 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#26 /home/keratai1/public_html/xxxxx.com/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#27 /home/keratai1/public_html/xxxxx.com/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#28 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /home/keratai1/public_html/xxxxx.com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /home/keratai1/public_html/xxxxx.com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /home/keratai1/public_html/xxxxx.com/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /home/keratai1/public_html/xxxxx.com/web/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /home/keratai1/public_html/xxxxx.com/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#37 {main}.
artem_sylchuk’s picture

@RgnYLDZ please see #3339976: expecting variable (T_VARIABLE) in private_message/src/Form/PrivateMessageForm.php for PHP < 8

However I strongly recommed to switch to php8+.
PHP7 has reached its end of the life already.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

robertragas’s picture

I believe this issue has re-surfaced between beta2 and stable. Since the stable changed this function again for d10 compatibility.