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

Possible debug toolbar css problem #5097

Closed
rramsey opened this issue Sep 15, 2021 · 3 comments · Fixed by #5100
Closed

Possible debug toolbar css problem #5097

rramsey opened this issue Sep 15, 2021 · 3 comments · Fixed by #5100
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@rramsey
Copy link

rramsey commented Sep 15, 2021

Direction
We use github issues to track bugs, not for support.
If you have a support question, or a feature request, raise these as threads on our
forum.

Describe the bug
When the debug toolbar is enabled, the style element at the end of the toolbarContainer div is missing the style declaration. I think this may be from bad data getting in the $styles object.

<style type="text/css">
    .debu
</style>

I think this is around like 270 in the toolbar.tpl.php where it's looping through the names in the $styles, but I'm not sure.

CodeIgniter 4 version
4.0.5

Affected module(s)
The debug toolbar

Expected behavior, and steps to reproduce if appropriate
Expect a complete style element. with a reference to an existing class. There may be an element with a debu class, but I didn't see it immediately. Something like this:

<style type="text/css">
    .debug {
        font-size: 18pt;
        color: blue;
    }
</style>

Or whatever style is appropriate.

@rramsey rramsey added the bug Verified issues on the current code behavior or pull requests that will fix them label Sep 15, 2021
@kenjis
Copy link
Member

kenjis commented Sep 16, 2021

I confirmed the css on develop. But I'm not sure where it comes from.

Screenshot 2021-09-16 18 54 46

@kenjis
Copy link
Member

kenjis commented Sep 16, 2021

Putting var_export($styles) before the <style> below shows:

array (
  'debug-bar-timeline-0' => 'left: 15.833377838135%; width: 20.879904429118%;',
  'debug-bar-timeline-1' => 'left: 36.718050638835%; width: 39.025147755941%;',
  'debug-bar-timeline-2' => 'left: 76.21169090271%; width: 11.881589889526%;',
  'debug-bar-timeline-3' => 'left: 88.104804356893%; width: 0.82492828369141%;',
  'debug-bar-timeline-4' => 'left: 88.108380635579%; width: 0.46491622924805%;',
  'debug-bar-timeline-5' => 'left: 88.644822438558%; width: 0.20345052083333%;',
  'debug-bar-timeline-6' => 'left: 89.01834487915%; width: 113.21147282918%;',
)

<style type="text/css">
<?php foreach ($styles as $name => $style) : ?>
.<?= $name ?> {
<?= $style ?>
}
<?php endforeach ?>
</style>

@rramsey
Copy link
Author

rramsey commented Sep 16, 2021

Well, I'm sorry I found a bug, but I'm glad it wasn't something stupid I've done. It's almost like the $name is getting truncated or something.

I don't know how much help I can right now. This is getting ready to move to a production site, so I don't want to play too much with the development build. Plus our environment has multiple apps using a shared system folder, which means the system/ folder is essentially read only ATM.

Is the $styles variable available to the controllers or views?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants