Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show fallback source as active theme if no validation errors #1592

Merged
merged 1 commit into from Nov 7, 2018

Conversation

westonruter
Copy link
Member

There is a bug in AMP_Validated_URL_Post_Type::render_sources_column() where it will render the active theme with a (?) after it (via 3be5767) when it can't find the source for an error, since in that case it is normally in the theme template itself. However, this was incorrectly showing the active theme when there were no validation errors at all to display in the summary at all. So this fix short-circuits the source summary display in this case.

Before

screen shot 2018-11-07 at 9 28 47 am

After

screen shot 2018-11-07 at 9 29 45 am

@kienstra
Copy link
Contributor

kienstra commented Nov 7, 2018

Approved

Hi @westonruter,
Good idea to output the -- and exit from the method if there's no error.

Just like you showed above, I also saw that this works as expected.

Before

validation-before

After

validation-after

@westonruter westonruter merged commit b7affeb into 1.0 Nov 7, 2018
@westonruter westonruter deleted the fix/source-summary-when-no-validation-errors branch November 7, 2018 18:47
@kienstra kienstra moved this from Ready for review to Ready for Merging in v1.0 Nov 8, 2018
@kienstra kienstra moved this from Ready for Merging to In Production in v1.0 Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v1.0
In Production
Development

Successfully merging this pull request may close these issues.

None yet

2 participants