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

Template style settings: colour boxes extremely narrow and php warnings #583

Open
ggieling opened this issue Jan 22, 2023 · 1 comment
Open
Labels

Comments

@ggieling
Copy link

Description

  1. The colour boxes <input type="color" name="tpl[__text__]" id="tpl____text__" ...> in the template style settings in dokuwiki are extremely narrow when working in the bootstrap3 template.
  2. The template style settings page shows warning messages. When opening the settings page in the wiki the below message appears below the colour boxes area.
    Warning: Trying to access array offset on value of type null in /srv/http/won1/content/inc/parserutils.php on line 151
    After opening as popup additional warnings appear above the coulor boxes area.
    Warning: Trying to access array offset on value of type null in /srv/http/won1/content/inc/toolbar.php on line 270 (twice)
    Warning: Trying to access array offset on value of type null in /srv/http/won1/content/inc/toolbar.php on line 271 (twice)

Steps to reproduce

  1. install bootstrap3 addon
  2. activate bootstrap3 addon
  3. goto admin -> Template Style Settings

Steps to solve

  1. revert to dokuwiki template

I expected the colour boxes to be visible in standard size as in the default dokuwiki template (box size 54x22) and the page to not display any warnings

colour boxes are extremely narrow (box size 3x20) and the warnings appear

Versions

  • [Bootstrap3 Template] v2022-07-27 (stable/20220727)
  • [DokuWiki] 2022-07-31a "Igor"
  • [Plugins]
    ACL manager
    advanced dokuwiki
    authpdo
    plain auth
    configuration manager
    extension manager
    info
    logviewer
    popularity feedback
    revert
    safefnrecode
    styling
    translation
    dokuwiki upgrade
    user manager
    video sharing site
    wrap
  • [PHP] 8.1.13
  • [Browser] firefox 109.0; chromium 109.0.5414.74

Screenshots or Logs

[Paste your logs or attach the screenshot]

Sample page or snippet

[Paste your sample DokuWiki page or snippet using MarkDown code syntax]

@ggieling ggieling added the bug label Jan 22, 2023
@Er4twXz
Copy link

Er4twXz commented Sep 3, 2023

This can be fixed by excluding inputs of type color from getting the form-control class

C:\server\Apache24\htdocs\dokuwiki\lib\tpl\bootstrap3\script.js
line 144
jQuery('input, select, textarea')
.not('[type=submit], [type=reset], [type=button], [type=hidden], [type=image], [type=checkbox], [type=radio], [type=color]')

C:\server\Apache24\htdocs\dokuwiki\lib\tpl\bootstrap3\Template.php
line 1502
if (!in_array($elm->type, ['submit', 'reset', 'button', 'hidden', 'image', 'checkbox', 'radio', 'color'])) {
$elm->class .= ' form-control';

I had to clear the cache C:\server\Apache24\htdocs\dokuwiki\data but I don't know whether its needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants