BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.43k stars 1.94k forks source link

Space above header bar #5266

Open bfruben opened 1 month ago

bfruben commented 1 month ago

Describe the Bug

When making my own theme and changing some phrases I ended up with extra space above the titlebar. image

This space only appears when I change copy and change the entities.php in the themes folder.

Steps to Reproduce

  1. Make your own theme
  2. Copy the entities.php from /lang/sv to /themes/theme_name/lang/sv
  3. Change the entities.php file
  4. Reload Bookstack with the custom theme

Note: When copying entities.php to the themes folder and not changing it, the extra space does not appear.

Expected Behaviour

No extra space above the titlebar

Screenshots or Additional Context

No response

Browser Details

Edge

Exact BookStack Version

BookStack v24.05.4

ssddanbrown commented 1 month ago

Note: When copying entities.php to the themes folder and not changing it, the extra space does not appear.

Just a note, you don't need to copy in the while file if you don't need to alter most translations, you can just add/override the translations as needed.

bfruben commented 1 month ago

Note: When copying entities.php to the themes folder and not changing it, the extra space does not appear.

  • What exactly are you changing which makes the space appear?
  • Are there any other files within your theme folder?

Just a note, you don't need to copy in the while file if you don't need to alter most translations, you can just add/override the translations as needed.

Thanks for the tip! I was removing everything that I didn't want to change. That's how I discovered this "bug". ;)

ssddanbrown commented 1 month ago

Thanks the the response @bfruben, I can't reproduce this, nor does it make sense really. I can only think the structure of the file is being modified in some way, casing stray text to be emitted at the start of the page/document.

With just one language override file active:

bfruben commented 1 month ago

Does the file still have just one <?php at the very very start of the file?

Yes

Does the text ?> exist in the file at all?

No

Is there any text in the top left corner within that added space (Try highlighting that area if you can't see any)?

There is now visible text on the page but there is in the html, see picture: image

ssddanbrown commented 1 month ago

@bfruben Yeah, that could cause space. The structure of the HTML in that screenshot also looks broken as I wouldn't expect those meta elements to be in that location reletive to the shortcut data.

bfruben commented 1 month ago

Have you got anything in the "Custom HTML Head Content" customization setting within the app?

Not anymore.

Does this space remain when viewing the customization settings page in the app?

No, it only shows on the books and shelves pages.