You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tpl/bootstrap3/EventHandlers.php, the formEditOutput() function did not check whether findPositionByAttribute() returned a non-false value. So when viewing read-only pages, it adds the css classes for the "save", "preview", and "cancel" buttons to the textarea containing source code, as it is not aware that these buttons are not present.
This causes the source code text to display incorrectly with broken word wrap as it is shown with the button css styles.
To fix this: simply add if ($form->findPositionByAttribute('name', 'do[save]') !== false) (and two others alike) before adding classes.
Steps to reproduce
Install bootstrap 3 template
(Unsure of potential influence by other plugins, but should be unlikely)
View any read-only page
Expected behavior: Source code to be displayed normally (for example)
Actual behavior: Source code shows with css classes for buttons
Description
In tpl/bootstrap3/EventHandlers.php, the formEditOutput() function did not check whether findPositionByAttribute() returned a non-false value. So when viewing read-only pages, it adds the css classes for the "save", "preview", and "cancel" buttons to the textarea containing source code, as it is not aware that these buttons are not present.
This causes the source code text to display incorrectly with broken word wrap as it is shown with the button css styles.
To fix this: simply add
if ($form->findPositionByAttribute('name', 'do[save]') !== false)
(and two others alike) before adding classes.Steps to reproduce
Expected behavior: Source code to be displayed normally (for example)
Actual behavior: Source code shows with css classes for buttons
Versions
Screenshots or Logs
https://wiki.crescb.com/lib/exe/fetch.php?media=screenshot.jpg
Sample page or snippet
Could not provide one as my own page is already fixed.
The text was updated successfully, but these errors were encountered: