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

Fixes #38223 - host_edit when no inherit button creates error #10447

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

MariaAga
Copy link
Member

Follow up on #10265
When editing a host, in foreman core without plugins, there is no inherit button on any of the fields, the causes this error:
Uncaught TypeError: document.querySelector(...) is null host_edit-a353532802cf651d1f8eaecab20ef1d6620e03c07c776b03559e9b18bebc15cf.js:1
for some reasons it makes it so the submit button redirects to the old details page, but still with the edit url
This causes the old details page to load on a loop

@github-actions github-actions bot added the Legacy JS PRs making changes in the legacy Javascript stack label Feb 18, 2025
@dvo-rak
Copy link

dvo-rak commented Feb 18, 2025

Thank you!

@MariaAga
Copy link
Member Author

We might want to cp it in 3.13, to work around a user can go to the details page / delete the the /edit from the url, or juts set up to use the new page

Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

Thanks, @MariaAga ! It fixes the issue described in #10265 (comment). Although, I didn't have exact error in console, rather a different one. The "stuck loading" was reproducible. With the patch, the redirection works and with the right URL.

Just FYI, to reproduce it, you should have disabled redirection to the new host details page in settings.

@ofedoren ofedoren merged commit c97a40e into theforeman:develop Feb 18, 2025
31 checks passed
@MariaAga
Copy link
Member Author

cp: #10454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Legacy JS PRs making changes in the legacy Javascript stack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants