Skip to content

Fixed unclosed tag inside ContentEditJob view (WP-1004)#618

Merged
vsolovei-smartling merged 2 commits into
Smartling:WP-1004-fix-content-edit-job-postbox-htmlfrom
koloml:fix-unclosed-html-tag
May 21, 2026
Merged

Fixed unclosed tag inside ContentEditJob view (WP-1004)#618
vsolovei-smartling merged 2 commits into
Smartling:WP-1004-fix-content-edit-job-postbox-htmlfrom
koloml:fix-unclosed-html-tag

Conversation

@koloml
Copy link
Copy Markdown

@koloml koloml commented May 20, 2026

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:

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-wizard element. 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 && false condition:

<?php if ($needWrapper && false) : ?>
<div class="postbox-container" style="width: 550px">
<div id="panel-box" class="postbox hndle"><h2><span>Translate content</span></h2>
<div class="inside">
<?php endif; ?>

But at the same time, this was not done for the closing tags condition:

<?php if ($needWrapper) : ?>
</div>
</div>
</div>
<?php endif; ?>

As a fix, I just added the same && false condition into the second case, but perhaps it would be better to just remove these wrapper conditions completely.

koloml added 2 commits May 20, 2026 12:37
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`
@vsolovei-smartling vsolovei-smartling self-requested a review May 21, 2026 08:02
@vsolovei-smartling vsolovei-smartling changed the title Fixed unclosed tag inside ContentEditJob view Fixed unclosed tag inside ContentEditJob view (WP-1004) May 21, 2026
@vsolovei-smartling vsolovei-smartling changed the base branch from master to WP-1004-fix-content-edit-job-postbox-html May 21, 2026 08:04
@vsolovei-smartling
Copy link
Copy Markdown
Contributor

Thank you, I'll add some more related changes to the file as well as release notes

@vsolovei-smartling vsolovei-smartling merged commit 52b2d37 into Smartling:WP-1004-fix-content-edit-job-postbox-html May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants