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

[BUGFIX] Disable LanguageOverlayMode in QuizRepository #48

Closed dijarbytyci closed 1 year ago

dijarbytyci commented 1 year ago

Disabling LanguageOverlayMode because it sets uid from translated Quizes to the uid of the parent (default language). This throws an error in the method checkQuizAccess in the QuizController class after the showAction was called.

I don't know if this is the best fix but we'll need this piece of code to make it run in other languages

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

bihor commented 1 year ago

Yes, your are right, there was a problem. I think findOneByUid() is not working as findByUid(): https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ExtensionArchitecture/Extbase/Reference/Domain/Repository.html#repository-findbyuid-and-language-overlay-modes Therefore a modification is necessary, but I think changing default setting with initializeObject() is not really necessary. But there are some more other changes necessary.

bihor commented 1 year ago

I have solved it without changing the $querySettings. Can you test version 3.5.6?

dijarbytyci commented 1 year ago

@bihor We'll be testing it this week. I'll let you know as soon as we tested it.

dijarbytyci commented 1 year ago

@bihor Everything is working fine. Thank you!