bihor / fp_masterquiz

TYPO3 extension to create a quiz, poll or test. The user result will be saved in the DB too and could be displayed as a chart.
GNU General Public License v3.0
5 stars 10 forks source link

Prevent PHP and JavaScript errors from missing settings #51

Closed linawolf closed 1 year ago

linawolf commented 1 year ago

In TYPO3 v12 the @import setting got more restrictive. It does ONLY import files ending on .typoscript now.

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97816-TypoScriptSyntaxChanges.html#import-is-more-restrictive-with-wildcards

In our projects we handle all imports in a typoscript file, using the @import syntax. This caused the TypoScript not beeing loaded.

Non-Loaded TypoScript should however only cause warnings or non-functions but not PHP type errors. Attached Commits prevent type errors in PHP and JavaScript and rename the files so they can be imported again. .ts files are kept for backward compability in TYPO3 v11.

references https://github.com/bihor/fp_masterquiz/issues/50

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

linawolf commented 1 year ago

@bihor any chance you have a look at this? for us it works fine

bihor commented 1 year ago

Well, I have been 12 weeks in vacation thats why I have merged it only now.

bihor commented 1 year ago

I have made a version 4.1.0 without the .ts files, because the version 4 is not compatible with TYPO3 10 or 11. Note: I could not test the upgrade wizard 'Fix image references for quizzes after update', because I can´t see it.