benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.

Home Page:https://www.bootstrap-package.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text and Icon not working after Upgrade or in an new v12

Nils-2023 opened this issue · comments

Hello all,

here is my first message. ;)

Weiß jemand Rat?

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v11.5 LTS
  • [x ] Can you reproduce the problem on TYPO3 v12.4 LTS
  • Did you perform a cursory search
    to see if your bug or enhancement is already reported?

Description

After Upgrading to v12 or a new v12 the "Text and Icon" Content Element will not working.
Please have a look to this forum: https://www.typo3forum.net/discussion/85682/upgrade-von-11-auf-12-funktioniert-nicht-ganz
There you can see the Error-Messages.

Steps to Reproduce

  1. [First Step] Upgrade from latest v11 to v12
  2. [Second Step] New v12 installation
  3. [and so on...]

Versions

Composer installation

Thank you very much.

Greetings,
Nils

Which exact version did you list in your composer.json for the boostrap package, and which version is actually installed for you?
Does running a composer dumpautoload help? That might re-create your _assets/ directory properly.

Maybe if you had 13.x on your T3v11 installation and then only upgraded the core, but not the bootstrap-package, some asset might not have been triggered? In that case, if the first dumpautoload doesn't help, try moving away _assets to _assets_backup and re-run composer dumpautoload, which should register all assets again.

In the end you should have these files in your directory public/_assets/9b80d86a98af3ecc38aabe297d2c3695/Css/ (for bootstrap v13):

-rw-------  1 garvin dialout 431832 Sep 11 09:25 bootstrap5-rte.css
-rw-------  1 garvin dialout 361619 Sep 11 09:25 bootstrap5-rte.min.css
-rw-------  1 garvin dialout 431534 Sep 11 09:25 bootstrap5-theme.css
-rw-------  1 garvin dialout 361389 Sep 11 09:25 bootstrap5-theme.min.css

In your link this looks problematic:

/mnt/web112/b0/71/53841271/htdocs/cms/public/cms/public/_assets/9b80d86a98af3ecc38aabe297d2c3695/Css/bootstrap5-rte.min.css

It looks as if your DocumentRoot is /mnt/web112/b0/71/53841271/htdocs/ but then the whole TYPO3 setup comes into / cms/public.

You don't open your backend with a URL like https://yourserver.example.com/cms/public/typo3/index.php, do you? That would be wrong. TYPO3 assumes that you set your webserver's DocumentRoot to /mnt/web112/b0/71/53841271/htdocs/cms/public/ and then open a URL like https://yourserver.example.com/typo3/index.php.

Maybe due some random act of weirdness this worked in TYPO3v11, but in composer mode of TYPO3v12 this is definitely not what you want. One would completely reveal his TYPO3 installation, if the DocumentRoot were to point to directories above public.

I stand corrected. Operating TYPO3 in a subdir is supported functionality, so this definitely is a bug. It's not a bug of bootstrap-package, but the core. I'll work on it tomorrow if nobody else does, and create an appropriate forge issue.

Note: This got fixed thanks to https://review.typo3.org/c/Packages/TYPO3.CMS/+/81295 and should thus be solved in the 12.4.7 release of TYPO3

Hello Garvin,

thank you very much for your help, the error is still present in the current version (at least for me).

Greetings,
Nils

Hey, thanks getting back.

Whats the exact error you get? I was referring to this one:

PHP Warning: sha1_file(/mnt/web112/b0/71/53841271/htdocs/cms/public/cms/public/_assets/9b80d86a98af3ecc38aabe297d2c3695/Css/bootstrap5-rte.min.css): Failed to open stream: No such file or directory in /mnt/web112/b0/71/53841271/htdocs/cms/vendor/typo3/cms-rte-ckeditor/Classes/Form/Element/RichTextElement.php line 144

In that file, no sha1() call exists anymore in 12.4.7, so you must be referring to another error I guess?

Note that composer installations i sub directories still face more issues than the specific one here, in different areas (see linked tickets). Those might take longer to fix...

Regards,
Garvin

Hi,

it is the same: Text and Icon will not work (will not be shown in the FE).
Frontend: "Oops, an error occurred! Code: 20231110200310347cxyz"
The rest from the BP works fine.

If I click in the BE at "Text and Icon":
"5_03
Oops, an error occurred!

File /cms/v12/public/_assets/9b80d86a98af3ecc38aabe297d2c3695/Images/Icons/Ionicons/alert-circled.svg does not exist.

More information regarding this error might be available online._"
The svg-file is in the folder!

Fehlerprotokoll:
"Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1530601103: File /cms/v12/public/_assets/9b80d86a98af3ecc38aabe297d2c3695/Images/Icons/Ionicons/alert-circled.svg does not exist. | Exception thrown in file /homepages/10/123.../htdocs/cms/v12/vendor/bk2k/bootstrap-package/Classes/Utility/SvgUtility.php in line 98. Requested URL: (http: //123.de/cms/v12/public/typo3/record/edit?token=--AnonymizedToken--&edit%5Btt_content%5D%5B222%5D=edit&returnUrl=/cms/v12/public/typo3/module/web/layout?token%3D--AnonymizedToken--%26id%3D1%23element-tt_content-222) "

In v11 it works fine:
domain/folder

V12
domain/folder/folder1

Maybe, the second subfolder is to much?

Regards,
Nils

Ah, I was mislead by the first link on your posting, there the first error was about RichTextElement.

The issue you're facing here is one of the other bugs that are open in the TYPO3 core (not a bug of this bootstrap package actually).

So unless this gets fixed, I can recommend to think about moving to a composer installation in the root of a (sub)domain, and not use a subdirectory on a host... 😔

Hi Garvin,

many many month later, but hey, typo3 is for free... ;)

I am not an expert and no programer, but I saw this and tryed it:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/83043
(https://review.typo3.org/c/Packages/TYPO3.CMS/+/83043/2/typo3/sysext/core/Classes/Resource/ResourceFactory.php)

I have added "false", it works for me, and all "texts and icons" work fine in backend and frontend.
But I don't know if this is correct and what typo3 intended.

If this is the correct solution, the article here is solved.

Thank you very much for your commitment and quick response! Top!

Herzliche Grüße
Nils

PS: Bei mir sieht der Pfad allerdings so aus: "/vendor/typo3/cms-core/Classes/Resource/ResourceFactory.php"

Thanks for getting back! Would you be able to comment in the review too that this solves an issue for you? That would help pushing things forward with it. 😃

Yes, of course. ;)