Problem/Motivation

Webhook throws a type error:

Noticed exception 'TypeError' with message 'explode(): Argument #2 ($string) must be of type string, array given' in /app/web/modules/contrib/tmgmt_crowdin/src/Controller/CrowdinWebhookController.php:42

  in explode called at /app/web/modules/contrib/tmgmt_crowdin/src/Controller/CrowdinWebhookController.php (42)
 in Drupal\tmgmt_crowdin\Controller\CrowdinWebhookController::process called at ? (?)
 in call_user_func_array called at /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php (123)
 in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::Drupal\Core\EventSubscriber\{closure} called at /app/web/core/lib/Drupal/Core/Render/Renderer.php (592)
 in Drupal\Core\Render\Renderer::executeInRenderContext called at /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php (124)
 in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext called at /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php (97)
 in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::Drupal\Core\EventSubscriber\{closure} called at /app/vendor/symfony/http-kernel/HttpKernel.php (181)
 in Symfony\Component\HttpKernel\HttpKernel::handleRaw called at /app/vendor/symfony/http-kernel/HttpKernel.php (76)
 in Symfony\Component\HttpKernel\HttpKernel::handle called at /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php (58)
 in Drupal\Core\StackMiddleware\Session::handle called at /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php (48)
 in Drupal\Core\StackMiddleware\KernelPreHandle::handle called at /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php (106)
 in Drupal\page_cache\StackMiddleware\PageCache::pass called at /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php (85)
 in Drupal\page_cache\StackMiddleware\PageCache::handle called at /app/web/core/modules/ban/src/BanMiddleware.php (50)
 in Drupal\ban\BanMiddleware::handle called at /app/web/modules/contrib/shield/src/ShieldMiddleware.php (270)
 in Drupal\shield\ShieldMiddleware::bypass called at /app/web/modules/contrib/shield/src/ShieldMiddleware.php (137)
 in Drupal\shield\ShieldMiddleware::handle called at /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php (48)
 in Drupal\Core\StackMiddleware\ReverseProxyMiddleware::handle called at /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php (51)
 in Drupal\Core\StackMiddleware\NegotiationMiddleware::handle called at /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php (51)
 in Drupal\Core\StackMiddleware\StackedHttpKernel::handle called at /app/web/core/lib/Drupal/Core/DrupalKernel.php (704)
 in Drupal\Core\DrupalKernel::handle called at /app/web/index.php (19)

Steps to reproduce

  • Create a translation job
  • Submit job to Crowdin
  • Add/approve translations in Crowdin

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 explode-typeError-3406768.patch797 bytesmohd sahzad
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

phma created an issue. See original summary.

mohd sahzad’s picture

Status: Active » Needs review
StatusFileSize
new797 bytes

I have fixed this issue in attached patch

heddn’s picture

Status: Needs review » Needs work

This needs a rebase and steps to reproduce the issue.

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta

Working on it!!

divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned
Status: Needs work » Needs review

Rebased the patch and converted into MR since patches are deprecated.
Also the steps to reproduce are already present in the issue summary.
Please review!!

heddn’s picture

Status: Needs review » Closed (outdated)

This got fixed elsewhere. Maybe in commit 2502907

Ignore this. Posted in error.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

heddn’s picture

Status: Closed (outdated) » Needs review

  • heddn committed d6d1a0ea on 8.x-1.x
    fix: #3406768 explode() throws TypeError in CrowdinWebhookController
    
    By...
heddn’s picture

Status: Needs review » Fixed

Thanks for the contributions.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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