Problem/Motivation

When on "Add Translation" page (admin/config/regional/tmgmt_translator/add) there are some errors.

1.) Use of undefined constant STREAM_WRAPPERS_WRITE_VISIBLE in Drupal\tmgmt_file\FileTranslatorUi->pluginSettingsForm() (line 48...).

2.) Undefined index: description in Drupal\tmgmt_file\FileTranslatorUi->pluginSettingsForm() (line 49...).

Proposed resolution

Fix them.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sasanikolic’s picture

Title: Solve errors on add translator page » Fix errors on add translator page
sasanikolic’s picture

Component: Translator: Local » Translator: File
giancarlosotelo’s picture

Status: Active » Needs review
FileSize
1.19 KB

Returned array from \Drupal::service('stream_wrapper_manager')->getWrappers() doesn't have a field description. So I am getting the descriptions from \Drupal::service('stream_wrapper_manager')->getDescriptions and also using the interface StreamWrapperInterface to get the constant.

sasanikolic’s picture

Status: Needs review » Reviewed & tested by the community

Seems ok to me.

sasanikolic’s picture

Status: Reviewed & tested by the community » Needs work

Reverting back what I just said, tested it and this is the error I get now:

Warning: htmlspecialchars() expects parameter 1 to be string, array given in Drupal\Component\Utility\SafeMarkup::checkPlain() (line 250 of core/lib/Drupal/Component/Utility/SafeMarkup.php).

juanse254’s picture

Seems to be working for me, please add test coverage.

giancarlosotelo’s picture

Status: Needs work » Needs review
FileSize
4.5 KB
2.91 KB

Added test and changes in the schema for the test works well.

juanse254’s picture

good to go in my opinion.

juanse254’s picture

Status: Needs review » Reviewed & tested by the community
Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, committed.

Status: Fixed » Closed (fixed)

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