Fixed unclosed tag inside ContentEditJob view (WP-1004)#618
Merged
vsolovei-smartling merged 2 commits intoMay 21, 2026
Conversation
When new React UI was introduced in ff6b525, element .job-wizard was covered with the `<div style="display: none">` element, but this element didn't have the corresponding closing tag.
First condition was forcibly disabled, but the second one was not. This potentially creates stray closing tags when `$needWrapper` is `true`
Contributor
|
Thank you, I'll add some more related changes to the file as well as release notes |
52b2d37
into
Smartling:WP-1004-fix-content-edit-job-postbox-html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed the issue with this specific postbox in the editor: when it's closed, all other postbox sections below it were refusing to open. After looking at the source code, noticed that this element was added when new React UI version of the view was implemented:
wordpress-localization-plugin/inc/Smartling/WP/View/ContentEditJob.php
Line 70 in f02eb5f
But, there was no closing tag for it anywhere below. You can notice that by looking at the original commit:
ff6b525#diff-61197ae0879f9a97b254300aa7482aaa977b5ee32692e0550e85c4806739d652R71
I assume it was meant to be added just to hide the previous
.job-wizardelement. So I added the closing tag for it.As for the second commit — it fixes the possibility where this hidden wizard element was creating 3 additional closing tags. In the same commit opening wrapper tags were disabled by
&& falsecondition:wordpress-localization-plugin/inc/Smartling/WP/View/ContentEditJob.php
Lines 94 to 98 in f02eb5f
But at the same time, this was not done for the closing tags condition:
wordpress-localization-plugin/inc/Smartling/WP/View/ContentEditJob.php
Lines 232 to 236 in f02eb5f
As a fix, I just added the same
&& falsecondition into the second case, but perhaps it would be better to just remove these wrapper conditions completely.