When I've enabled redirect module and set up a Enforce clean and canonical URLs. I cannot deploy any content to the remote and local system. I've got some errors like:
From deployer

Doctrine\CouchDB\HTTP\HTTPException: HTTP Error with status 404 occurred while requesting /. Error: not_found Workspace does not exist. in Doctrine\CouchDB\HTTP\HTTPException::fromResponse() (line 68 of /var/www/localhost/htdocs/vendor/relaxedws/couchdb/lib/Doctrine/CouchDB/HTTP/HTTPException.php).

On deployed:

Location	
http://example.com/relaxed/relaxed
Message	
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Workspace does not exist. in Drupal\relaxed\Plugin\rest\resource\ResourceBase->checkWorkspaceExists() (line 141 of /var/www/localhost/htdocs/docroot/modules/contrib/relaxed/src/Plugin/rest/resource/ResourceBase.php).

Comments

Andriy Khomych created an issue. See original summary.

andriy khomych’s picture

Issue summary: View changes
andriy khomych’s picture

Title: Issue with redirect module. » Issue with redirect module - Error: not_found Workspace
Issue summary: View changes
andriy khomych’s picture

I think it can be fixed in the Doctrine\CouchDB\HTTP\SocketClient.php::request function, as it uses often URLs like /relaxed/, that ending on slash. However, I'm not good in this, as a short and simple fix I've made a patch with RouterSubscriber that skips all REST Relaxed routers from redirecting.

jeqq’s picture

jhedstrom’s picture

Status: Active » Needs review

This resolved the issue for me.

jeqq’s picture

Will review this next week at Drupal Dev Days.

jeqq’s picture

Issue tags: +DevDaysTransylvania
StatusFileSize
new2.31 KB
new2.19 KB

Added a check to alter the routes only if the Redirect module is installed and clean routes are enabled.

  • jeqq committed 6e905ef on 8.x-1.x authored by Andriy Khomych
    Issue #3007313 by Andriy Khomych, jeqq: Issue with redirect module -...
jeqq’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

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