Problem/Motivation

When we added support for interface translation in Lingotek (#2924541: Add support for interface translation strings), we reused the same render elements used for content entities, but without passing an entity.
The preprocess in this module assume there is an entity, and that's used for changing the link so we avoid calling the TMS and use the own provided routes for copying from source.

Steps to reproduce

Enable potx and lingotek_copy_source, and visit the interface translation from Lingotek module.

Proposed resolution

For now, we just need to avoid the WSOD.

Ideally, we would want to copy from the source language in interface translation as we do with content. But interface translations don't have profiles associated, which is were we are storing the copy source configuration. So we may tackle that, but as a different issue.

Remaining tasks

Fix. Add tests.

User interface changes

No WSOD would be great :-P

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#22 3187944-ltkcopysource-interface-translation-wsod-22.patch39.17 KBpenyaskito
#22 3187944-ltkcopysource-interface-translation-wsod-22.only-tests.patch33.46 KBpenyaskito
#22 3187944-ltkcopysource-interface-translation-wsod.interdiff.19-22.txt1.65 KBpenyaskito
#19 3187944-ltkcopysource-interface-translation-wsod.interdiff.16-19.txt1.62 KBpenyaskito
#19 3187944-ltkcopysource-interface-translation-wsod-19.patch37.78 KBpenyaskito
#19 3187944-ltkcopysource-interface-translation-wsod-19.only-tests.patch33.46 KBpenyaskito
#16 3187944-ltkcopysource-interface-translation-wsod-16.patch36.41 KBpenyaskito
#16 3187944-ltkcopysource-interface-translation-wsod-16.only-tests.patch33.46 KBpenyaskito
#16 3187944-ltkcopysource-interface-translation-wsod.interdiff.13-16.txt1.22 KBpenyaskito
#13 3187944-ltkcopysource-interface-translation-wsod-13.patch35.9 KBpenyaskito
#13 3187944-ltkcopysource-interface-translation-wsod-13.only-tests.patch33.46 KBpenyaskito
#13 3187944-ltkcopysource-interface-translation-wsod.interdiff.5-13.txt34.06 KBpenyaskito
#8 3187944-ltkcopysource-interface-translation-wsod-8.patch2.71 KBpenyaskito
#8 3187944-ltkcopysource-interface-translation-wsod-8.only-tests.patch1.05 KBpenyaskito
#8 3187944-ltkcopysource-interface-translation-wsod.interdiff.5-8.txt284 bytespenyaskito
#5 3187944-ltkcopysource-interface-translation-wsod-5.patch2.43 KBpenyaskito
#5 3187944-ltkcopysource-interface-translation-wsod-5.only-tests.patch787 bytespenyaskito
#5 3187944-ltkcopysource-interface-translation-wsod.interdiff.3-5.txt706 bytespenyaskito
#4 3187944-ltkcopysource-interface-translation-wsod-3.patch2.31 KBpenyaskito
#4 3187944-ltkcopysource-interface-translation-wsod-3.only-tests.patch663 bytespenyaskito

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Crediting Charlie for reporting it.

penyaskito’s picture

Attached patch with tests.

penyaskito’s picture

The last submitted patch, 5: 3187944-ltkcopysource-interface-translation-wsod-5.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 5: 3187944-ltkcopysource-interface-translation-wsod-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Not sure if the testbot would like this or I need to commit the info.yml changes separately.

The last submitted patch, 8: 3187944-ltkcopysource-interface-translation-wsod-8.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 8: 3187944-ltkcopysource-interface-translation-wsod-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • penyaskito committed 723af1b on 1.0.x
    Issue #3187944 by penyaskito, charlesj: Added potx test_dependency...
penyaskito’s picture

penyaskito’s picture

Oops, that test depends on the index of the module, and sadly this modules comes first, and we cannot alter that with the current test.
I'm just going to copypaste the test so we don't depend on a concrete (and yet unreleased) version ¯\_(ツ)_/¯

This patch also includes the changes in \Drupal\lingotek_copy_source\Controller\LingotekNotificationController so we handle correctly the interface translation callbacks.

The last submitted patch, 13: 3187944-ltkcopysource-interface-translation-wsod-13.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 13: 3187944-ltkcopysource-interface-translation-wsod-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

The last submitted patch, 16: 3187944-ltkcopysource-interface-translation-wsod-16.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 16: 3187944-ltkcopysource-interface-translation-wsod-16.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Interface translation will return always NULL as the profile, so we need to check for that.

The last submitted patch, 19: 3187944-ltkcopysource-interface-translation-wsod-19.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 19: 3187944-ltkcopysource-interface-translation-wsod-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

We don't want to automatically request translations neither with a null profile.

The last submitted patch, 22: 3187944-ltkcopysource-interface-translation-wsod-22.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

Tests passed and failed as expected.

  • penyaskito committed 382516f on 1.0.x
    Issue #3187944 by penyaskito, charlesj: WSOD when visiting interface...
penyaskito’s picture

Status: Reviewed & tested by the community » Fixed

Committed 382516f and pushed to 1.0.x. Thanks!

Status: Fixed » Closed (fixed)

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