trafo2 / t2_scss

Simple scss compiling for TYPO3 CMS
GNU General Public License v3.0
0 stars 0 forks source link

Exception / PHP Warning: unlink() #1

Open saschaluebeck opened 3 years ago

saschaluebeck commented 3 years ago

Hey there,

love the Extension but I got a problem here. When changing something to the scss file and try to view the frontend, then I got an warning:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception PHP Warning: unlink(typo3conf/ext/myext/Resources/Public/assets/css/styles_a43662b34f3563fe6f871f21e9141e11.css): No such file or directory in C:\laragon\www\customer\typo3conf\ext\t2_scss\Classes\Controller\PhpCompilerController.php line 36

It seems, it is trying to remove the old generated css but this file is not even there anymore. The current file got another name "styles_0a1a5d0cec8ca3cf6b04bb7f1f675226.css".

Is this a missconfiguration of mine?

System: TYPO3-Version | 10.4.10 Webserver | Apache/2.4.35 (Win64) OpenSSL/1.1.1b PHP/7.2.19 PHP-Version | 7.2.19 MySQL | 5.7.24 OS | WINNT 10.0 t2_scss | 1.0.1

Thanks for help.

Best, Sascha

trafo2-buddy commented 3 years ago

Hi Sascha,

do you have forceMode enabled in your typoscript settings? Try to disable it: plugin.tx_t2scss.settings.forceMode = 0 This should fix the issue for now.

The next release will solve the force mode.

saschaluebeck commented 3 years ago

Thanks a lot for getting back to me. Yes, this removed the error message.

Thanks and keep up the good work. Appreciate it!

Best, Sascha

saschaluebeck commented 3 years ago

Sorry, but I have to revise that. The problem still exists.

forceMode is on 0. The file in the folder is "styles_0a57fa7072d15490669fde497e5fdb8e.css". Error MSG:

PHP Warning: unlink(typo3conf/ext/******/Resources/Public/assets/css/styles_23b9bf4c9497cac35c06e441be32f5c8.css): No such file or directory in C:\laragon\www\******\typo3conf\ext\t2_scss\Classes\Controller\PhpCompilerController.php line 36

When I add a new file with name "styles_23b9bf4c9497cac35c06e441be32f5c8.css" error is gone and website shows up. File "styles_23b9bf4c9497cac35c06e441be32f5c8.css" remains in folder.

When I change my scss and reload the page the error shows up again but now with missing "styles_5d835d0dbe1b2a5c3e5a08e3fbb782b6.css".

By adding blank "styles_5d835d0dbe1b2a5c3e5a08e3fbb782b6.css" page loads again and using the file now filled with css. "styles_5d835d0dbe1b2a5c3e5a08e3fbb782b6.css" is removed.

Best, Sascha

trafo2-buddy commented 3 years ago

Are you sure that you have disabled forceMode properly? The line stated in the warning will never be executed with disabled forceMode.

saschaluebeck commented 3 years ago

Yes, pretty sure. I checked the template setup in Typo3 backend to be sure. It says:

plugin.tx_t2scss.settings.forceMode = 0