Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Fixed module compatibility with tide_edit_protection.#15

Open
joshua1234511 wants to merge 1 commit intodpc-sdp:developfrom
joshua1234511:feature/fix-toString-error-tide-edit-protection
Open

Fixed module compatibility with tide_edit_protection.#15
joshua1234511 wants to merge 1 commit intodpc-sdp:developfrom
joshua1234511:feature/fix-toString-error-tide-edit-protection

Conversation

@joshua1234511
Copy link

Issue:
When tide_edit_protection and tide_demo_content both are enabled. error is thrown on page /admin/content/import_demo_content.
Though content gets imported the error is noticed.
Screenshot 2021-07-25 at 11 38 13 AM

Changed: Added translation.
Issue Resolved

$this->contentLoader->setContentPath($temp_dir);
$entities = $this->contentLoader->loadContent($temp_name);
$this->messenger()->addMessage($this->formatPlural(count($entities), '1 demo entity has been imported.', '@count demo entities have been imported.') . ' Only node and media type entities are listed below - ');
$this->messenger()->addMessage($this->t($this->formatPlural(count($entities), '1 demo entity has been imported.', '@count demo entities have been imported.') . ' Only node and media type entities are listed below - '));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is invalid. formatPlural() should not be wrapped inside a t().

The issue is caused by tide_edit_protection module hence the fix must be in that module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants