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

Missing icons in admin #11

Open
piotrkwiecinski opened this issue Jun 19, 2024 · 6 comments
Open

Missing icons in admin #11

piotrkwiecinski opened this issue Jun 19, 2024 · 6 comments

Comments

@piotrkwiecinski
Copy link
Contributor

@hostep have you encountered the problem with missing icons in admin dashboard while using this plugin?

I don't see any errors in system.log.

Magento version: 2.4.6-p5
Less: 3.13.1

I tested it in 2 different projects. Looks like @font-face: 'Admin Icons' isn't added.

missing-icons

@hostep
Copy link
Member

hostep commented Jun 19, 2024

Hey @piotrkwiecinski, yeah I know, we probably should do better error handling in this module, if you look at the first line of generated css, you'll see some errors.
Good that you've opened a ticket, this has been on my mind for a long time but I keep forgetting about it.

Most likely, you're running into a less/css bug in the magento pagebuilder module, here's a fix to fix those: magento/magento2-page-builder#777 (fix was created 3 years ago, but only got merged 3 weeks ago, so I guess it will be included in Magento 2.4.8)

@piotrkwiecinski
Copy link
Contributor Author

piotrkwiecinski commented Jun 19, 2024

@hostep thank you for a quick reply. I'll try to apply the patch.

Yeah another lightning fast PR processing in Magento core🙂

@hostep
Copy link
Member

hostep commented Jun 21, 2024

Some observations after looking a bit more closer into this:

I'm thinking of changing the default less compilation flag from --no-color to --no-color --silent, so no errors are outputted in the generated css.
Only downside I'm seeing is that there is no indication anywhere that you have an error in your less code. But I guess that's fine, since the compiler Magento uses also doesn't pick this up...

Does this sound like an okay solution to you @piotrkwiecinski?

@piotrkwiecinski
Copy link
Contributor Author

@hostep it may be a good solution for now. Ideally we would forward these errors to stderr so they're outputted in the console.

In one project in testing this module some css files aren't generated at all in the CI pipeline.

I'm trying to figure out what's the difference between my local dev vs pipeline itself.

I'll try to poke around the code in upcoming weeks.

@hostep
Copy link
Member

hostep commented Jun 21, 2024

Okay, as for separating stdout and stderr, I'll try to take a look at the possibilities of switching to proc_open or using the symfony/process library, both should allow us to get the separate output and then doing 'something' (outputting or logging, or both) with them.

@piotrkwiecinski
Copy link
Contributor Author

I have some success with Symfony\Process:

Compilation from source: /var/www/html/app/design/frontend/Pearl/weltpixel/web/css/styles-l-temp.less
The command "'/usr/bin/node' '--no-deprecation' '/var/www/html/node_modules/.bin/lessc' '--no-color' '/var/www/html/var/view_preprocessed/pub/static/frontend/Pearl/weltpixel_custom/en_GB/css/styles-l-temp.less'" failed.

Exit Code: 1(General error)

Working directory: /var/www/html

Output:
================


Error Output:
================
ParseError: Unrecognised input. Possibly missing opening '{' in /var/www/html/var/view_preprocessed/pub/static/frontend/Pearl/weltpixel_custom/en_GB/css/source/_icons.less on line 11, column 1:
10 
11 }
12 

I just made quick swap for the shell runner. piotrkwiecinski@1dc7574 .

I'll try to do some additional tests next with with the other project and see if it helps me with debugging missing css files.

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

No branches or pull requests

2 participants