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

iconpack CSS not loaded in news #22

Closed
grosswerner opened this issue Jun 24, 2024 · 18 comments
Closed

iconpack CSS not loaded in news #22

grosswerner opened this issue Jun 24, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@grosswerner
Copy link

grosswerner commented Jun 24, 2024

I have installed the following extension "ICONPACK" for Typo3 version 12, the extension also works as desired with normal content elements.

I then installed the news (11.4.2) extension, the "insert ICON" is displayed in the editor, something is also inserted when I switch to the source code in the editor, as follows

<span class="fas fa-apple-whole" data-iconfig="fa6:solid,apple-whole"></span>

been inserted, but the ICON is not displayed in either the frontend or the backend. What else do I have to do to make it work in the NEWS?
Greetings Werner

@stephankellermayr stephankellermayr added the bug Something isn't working label Jun 24, 2024
@stephankellermayr stephankellermayr changed the title iconpack in news iconpack CSS not loaded in news Jun 24, 2024
@stephankellermayr
Copy link
Member

Thank you for your feedback!

You're right, there is something wrong here. Obviously the necessary CSS is not loaded in the backend when editing news records. ...I'll have to take a closer look at this.

However, if you save the record, the icon is still displayed correctly in the frontend.

@grosswerner
Copy link
Author

No, even in the frontend, if you look at the source code of the output page, you can only see the code as in the editor

@stephankellermayr
Copy link
Member

stephankellermayr commented Jun 24, 2024

No, even in the frontend, if you look at the source code of the output page, you can only see the code as in the editor

Have you enabled the autoConfigRte and autoAddAssets option in the extension settings? ...and have you added the TypoScript correctly?

https://docs.typo3.org/p/quellenform/t3x-iconpack/main/en-us/Configuration/Index.html

However, these are two completely different things. The fact that no CSS ends up in the BE is actually a bug that I can reproduce and that I am currently working on fixing, but the fact that no CSS ends up in the FE is a different issue.

@grosswerner
Copy link
Author

So I have attached a screenshot regarding your questions, I think I have configured everything accordingly

Template
iconpack
Extension

and then browser views

BrowserAnsicht
BrowserSource

@stephankellermayr
Copy link
Member

OK, I see, the transformation from RTE > FE does not seem to be activated here for some reason. Can you please check the value for $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Core\Html\RteHtmlParser] under System > Configuration?

You should see the following here:
Bildschirmfoto_2024-06-24_15-30-39

But just to clarify again: This has nothing to do with the topic you mentioned at the beginning.

@stephankellermayr
Copy link
Member

PS: I assume you've already tried clearing the cache anyway, right? And it would be helpful to know which TYPO3 version we are talking about here.

@stephankellermayr
Copy link
Member

The bug you originally mentioned has just been fixed with version 1.1.6.

  • e98e5d8 Switched from PageRenderer to AssetCollector

@grosswerner
Copy link
Author

the following values under System > Configuration?

Global

I deleted the cache via the flashes, I even deleted the typotemp
it is the following typo3 version 12.4.16

@stephankellermayr
Copy link
Member

Unfortunately, I cannot reproduce the error with 12.4.16.

It is possible that the problem is related to some individual setup that I cannot analyze without more detailed insight.

But could you please try version 1.1.6 and verify that everything (news) now works in the BE to close this issue?

@stephankellermayr
Copy link
Member

stephankellermayr commented Jun 24, 2024

Ah, just a moment!

You have activated "FontAwesome 5.15.4" in the extension setup and in the frontend you can see that you are using FontAwesome 6 (fa6)!

You can only display the icon pack in the frontend that you have activated in the extension setup!

Please check all settings again (and don't forget to clear the caches).

@grosswerner
Copy link
Author

In the backend it now works in both the normal content and news areas

I also switched back to 6.5.1 in the extension configuration fontawesome, deleted all the cache in the normal "FE" content, it still only works in the "FE" news area it doesn't work

@stephankellermayr
Copy link
Member

OK, now I'm slowly figuring out what exactly you mean ;-)

In this case, the RTE field of the news data record would also have to be processed via a DataProcessor:
https://docs.typo3.org/p/quellenform/t3x-iconpack/main/en-us/Tutorials/Usage.html#rte-fields

Without this, the icons would not be translated by the RteHtmlParser.

I don't have the exact instructions to hand and unfortunately I don't have the time now, but maybe you can figure it out yourself.

@grosswerner
Copy link
Author

I have to admit I'm not a programmer, I can't really do anything with it, I tried the following code for the news teaser

    // Add IconpackWizard to the teaser field
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
       'tx_news_domain_model_news', [
          'teaser' => [
             'config' => [
                'type' => 'text',
                'renderType' => 'IconpackWizard',
                'rows' => 5,
                'cols' => 40,
                'enableRichtext' => true,
                'richtextConfiguration' => 'default'
             ]
          ]
       ]
    );

};

$boot();
unset($boot);

in the typo3conf/ext/news/Configuration/TCA/Overrides/tx_news_domain_model_news.php, but then the teset field appears in the news maintenance mask. If you would be willing to help me solve this for money.

@stephankellermayr
Copy link
Member

The IconpackWizard is only intended for fields that are to provide a single icon directly and not for RTE or text fields. You would need the DataProcessor for RTE fields.

What exactly are you trying to do here? Have you enabled an RTE for the teaser field?

@grosswerner
Copy link
Author

In the backend, I have activated the RTE for both the teaser and text fields in the news.
If I insert an icon in one of the above fields in the backend, it works there and I can see the icon.

However, the icon is not displayed in the frontend.
The problem persists, even with the code snippet:

# Set templates and dataProcessing
lib.contentElement {
   dataProcessing {
      # This is required to render icons in RTE fields!
      # The output is controlled exclusively by the DataProcessor and then cleaned up by the Sanitizer.
      3212170022 = Quellenform\Iconpack\DataProcessing\IconpackProcessor
      212170022 {
         fieldName = teaser
         fieldType = rte
      }
   }
}

My goal is that the ICONS are visible for both the NEWS text and the NEWS teaser in the frontend.

@stephankellermayr
Copy link
Member

Hopefully your second issue has now been resolved with another new version (1.1.7).

I am therefore closing this for now.

Feel free to open a new one at any time if you have any questions.

Also a donation to this project is always welcome and helps to work on further bug fixes and feature requests.

@ErHaWeb
Copy link

ErHaWeb commented Jun 28, 2024

I can confirm that the output now works in the context of the news extension (just tested).
Details of my test (in German) can be found here: https://forum.t3academy.de/d/475-extension-iconpack/6

@grosswerner
Copy link
Author

es it works perfectly, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants