Hi,

I've come across what appears to be a bug with the module that renders it unusable on my site.

When I install the module in the UI, I get a white screen with "The website encountered an unexpected error. Please try again later."

I can press the 'Back' button and get back to the UI. However, the menu option as described in the module description is not there, and the logs do not report that the module was installed, although I am able to uninstall it. Instead, the following error appears in the logs:

Symfony\Component\DependencyInjection\Exception\LogicException: Service 'logger.cslog' for consumer 'logger.factory' does not implement Psr\Log\LoggerInterface. in Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->process() (line 126 of /Users/jess/Sites/devdesktop/message-lab/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php).

The same error appears if I try to run drush cr at the top of a stack trace. If I 'uninstall' the module, I can run drush cr without issue.

Flushing the caches from within the UI makes no difference.

I'd really like to use this module so if anyone has any suggestions please let me know.

Thanks,
Jesse.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

imperator_99 created an issue. See original summary.

imperator_99’s picture

Please not that this error also occurs with the dev version.

EDIT: It also appears that only removing it entirely from the file system stops the error from reappearing.

Blanca.Esqueda’s picture

Hi Jesse,

I wasn't able to replicate it. I even used https://simplytest.me with content_sync and didn't have that issue either.

If you can let me know a bit more info, maybe some other modules installed that use the logs.. I could do more troubleshooting and resolve any conflict.

FYI a new version is being developed right know, and in fact one of the improvements is to use a custom log. It should be available soon.

Regards,
Blanca

Blanca.Esqueda’s picture

Hi Jesse,

Again me, even when I've not been able to replicate the error I can see that it is related to the logs.

Please, try commenting out (add # at the beginning of each line) or deleting the following lines:

  logger.cslog:
    class: Drupal\content_sync\Logger\ContentSyncLog

    arguments: ['@database', '@logger.log_message_parser']
    tags:
      - { name: logger }
      - { name: backend_overridable }

from this file:
content_sync.services.yml

Note: the above would remove the log functionality (summary of import, export,warnings, errors) of the module, but you should be able to use the rest of the functionality. Export your site content first, before any import so even if you don't have logs at least you would have your original content for reference.

Please let me know if this works for you,
Blanca

imperator_99’s picture

Thanks Blanca, that's done the trick. I was able to install the module and it all appears to be working fine. The only issue I had further was an error about a missing theme, which I presume is related to commenting out the code as you suggested, but it doesn't seem to have had any effect beyond the error message.

Cheers,
Jesse.

bojanz’s picture

Priority: Major » Critical

Same error just crashed the fresh Drupal 8.3 install I wanted to use to test this module.

Removed the service to continue testing.

lamp5’s picture

The same error on Drupal 8.3.

Blanca.Esqueda’s picture

FYI, we were able to replicate the issue.
Next release is planned for Aug 4th, it would replace the service and include other features as Drush commands and support for paragraphs, etc..

Would update this issue as soon as the next release is done!

lalop’s picture

Any news of the new release ?

Blanca.Esqueda’s picture

Hi lalop,

More contributors are joining the content_sync team, we are merging work it is why the next release it is taking us a bit longer.
On the bright side more people involved means more features being added to the release, plus more help to resolve future issues faster.

I'm afraid to say a date, because we are delayed already of our expected release date, but we hope that the new release would be before the end of August.

Thank you for your patience.

imperator_99’s picture

Status: Active » Closed (outdated)
Issue tags: -l

Closing this issue as the maintainer looks to be fixing it in the next release.

websiteworkspace’s picture

@imperator_99

The proposed release did not occur in August 2017.
The problem described here with this module still exists.

websiteworkspace’s picture

Status: Closed (outdated) » Active
JonasSavs’s picture

Hi all,

here a patch to fix it.

Looks like there is a bad encoded character. The g to be exact. Just erase the ContentSyncLo(g) and re-add it or apply this patch.

Regards

c-c-m’s picture

Status: Active » Reviewed & tested by the community

I can confirm the same problem with a fresh install (drupal 8.4.1) and Content_sync 8.x-1.2.

Applied patch at #14 worked fine and allowed me to install the module.

Blanca.Esqueda’s picture

Thank you @JonasSavs,
I completely missed that bad encoded char.

I already added the fix to the the new version 8.x-2.x and credited you:
https://www.drupal.org/node/2865869/committers

Please feel free to pull version 8.x-2.x and do some testing, but be aware that the yaml files are different from one version to the other as some changes were needed to implement new functionality. (that means the same version has to run on the source and target sites).

Londova’s picture

The following error blocks the module installation on existing Drupal Commerce site:
"Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'commerce_log' entity type in Drupal\Core\Entity\Entity->toUrl() (line 215 of /.../core/lib/Drupal/Core/Entity/Entity.php)."

I uninstalled the "commerce_log" module and repeat the procedure. A similar error occurred:
"Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'commerce_order_item' entity type in Drupal\Core\Entity\Entity->toUrl() (line 215 of /.../core/lib/Drupal/Core/Entity/Entity.php)."

Please, help.

websiteworkspace’s picture

@londova

You need to make the following change to the module's code until a new release is available.



--- ./content_sync.services.yml	2017-11-07 16:38:38.000000000 +0100
+++ ./content_sync.services.yml	2017-11-07 16:38:45.000000000 +0100
@@ -1,6 +1,6 @@
 services:
   logger.cslog:
-    class: Drupal\content_sync\Logger\ContentSyncLog

+    class: Drupal\content_sync\Logger\ContentSyncLog
     arguments: ['@database', '@logger.log_message_parser']
     tags:
       - { name: logger }


Londova’s picture

FileSize
20.71 KB

@websiteworkspace

I made this change before.
The actual error appear when enabling the module.
See the attached image for error message.

Blanca.Esqueda’s picture

Hi Londova,

Do you have the same issue if you the version 8.x-2.x?
There is a branch that has that version.

Please let me know,
Blanca

Londova’s picture

@Blanca.Esqueda

Drupal 8.4.2; Content Synchronization 8.x-1.2; Drupal Commerce 8.x-2.x-dev

Londova’s picture

FileSize
16.84 KB
44.51 KB

Very strange behaviour.
Yesterday "switch ON" the module, I had the error from picture "__error.png".
Today morning I restart the computer and my screen displayed absolutely other messages - see pictures attached.
Is that as should be?

Londova’s picture

I disabled the module, cleared cache and enable it again.
The error message appear again.

xrampage16’s picture

Just performed install of 8.x-1.2, and received the error. I performed the same action as #19, and did an uninstall, and went back and performed an install, and it resolved the issue.

Blanca.Esqueda’s picture

Please use the version 8.2:
https://www.drupal.org/project/content_sync/releases/8.x-2.x-dev

This is a dev version but after adding the option to handle images/files as well this would be the stable version and the one we would be maintaining. Be aware that the yaml files are different from one version to the other as some changes were needed to implement new functionality (that means the same version has to run on the source and target sites).

jasonellington’s picture

Very helpful. thanks.

Blanca.Esqueda’s picture

Version: 8.x-1.2 » 8.x-2.0
Status: Reviewed & tested by the community » Fixed

Patch has been included to release 8.x-2.0

Blanca.Esqueda’s picture

Status: Fixed » Closed (fixed)