AcclaroInc / craft-translations

Easily manage your Craft CMS website translations and drive global growth with simplified translation workflows.
https://plugins.craftcms.com/translations
Other
9 stars 11 forks source link

Error when downloading #420

Closed Sjouwke closed 1 year ago

Sjouwke commented 1 year ago

We’re having issues downloading orders on a client project. We can create orders, but we get an error when trying to download the order.

We always get this error: DOMDocument::loadXML():EndTag:’&alt;/‘ not found in Entity, line:43

image

We currently have 3 sites:

We only include the ‘Dutch’ option in our order, but that doesn't change anything either. We don't see any related twig validation errors in the selected pages.

These are the specs of the project: Craft version: 4.3.8.2 PHP version: 8.1.15 PHP DOM Enabled: true MultiSite: true Plugin List: {"colour-swatches":"4.2.1","cp-field-inspect":"1.4.4","dashboard-begone":"2.0.0","knock-knock":"2.0.7","minify":"4.0.0-beta.2","neo":"3.6.2","nocache":"3.0.0","postmark":"3.0.0","redactor":"3.0.3","sentry-logger":"4.1.1","seomatic":"4.0.20","sprig":"2.5.1","enupal-stripe":"5.1.0","translations":"v3.2.1","typedlinkfield":"2.1.5","units":"dev-develop-v4”}

shnsumit commented 1 year ago

@Sjouwke Hi,

We tried to reproduce this error but we were not able to reproduce it at our end. We would need few more details about the order before we move ahead with debugging:

  1. What type of element was used in order (Entry, Category, Global Set or Asset etc).
  2. What were the fields in included element. (better we get the element structure/fields in details like if the field was created with native craft type or any plugin that introduce the fields) this will help us in re-creating a similar element to reproduce the error.
  3. Would like to see the order activity log that is available on order details page.
  4. Log file can be very helpful. Be sure to enable logs from Translations plugins settings section and then try to download (this way error details will be available in log files).

Feel free to reach our if you have any question.

Thanks

Sjouwke commented 1 year ago

Hi @shnsumit,

  1. We only select Entries

  2. We use:

  3. The activity log only says that the order is created, nothing more, for example:

    Screenshot 2023-03-03 at 06 54 31
  4. I see that downloading the log files also results in an error: Call to a member function format() on bool. These are the logfiles of today I downloaded manually from our server: translations-2023-03-03.log

Thanks for your help!

shnsumit commented 1 year ago

@Sjouwke Thanks for sharing the information.

Unfortunately we were not able to reproduce the exact issue using above information or log file. We have tried to reproduce the issue using different scenarios with the mentioned fields but all were fine for us.

Looks like the log errors were there while it was trying to convert XML to CSV file and XML was not correctly formatted so giving error in parsing.

That can be due to some edge case based on how the entry were structured that we were not able to create at our end to reproduce.

⏭️ Next Action

  1. Is it possible to provide us the access of any stage/test environment where you are getting this issue for further debugging?
  2. If yes please provide the access to my mail id sumit@semantic.dev

Downloading log files error was fixed in our latest release, you can update the plugin and try to download the logs again.

Sjouwke commented 1 year ago

Hi @shnsumit

I've updated to the most recent version, but downloading log files still throws the same error. However, the initial issue does seem to be fixed now since the update: although I still can't download some older orders, new ones seem to work fine.

I gave you access to one of our test environments where we still have 1 new order, in case you want to check why that order doesn't work.

shnsumit commented 1 year ago

@Sjouwke Hi, Thanks for providing access. Actually, the issue was due to the emojis used in the entry content that was not supported and it was throwing an XML parse error.

As you were saying after updating for new orders it was working fine - it's because there might be no emojis in the entry content used for those orders.

image

We will try to add that emoji support in the upcoming release which can take a few weeks.

If you feel that this is a blocker for you then here is a small workaround.

You can create orders with entries that don't have emojis or maybe you can remove the emoji from the original entry (as I can see there is one entry with only one emoji) and create the order. Once translated then can update the original entry and translated entries directly using the admin panel to add emoji.

Let us know if you have any questions.

Sjouwke commented 1 year ago

Hi @shnsumit Ok, thanks for looking into this! I'll let my client know the workaround!