Bug #84595

EXT:form tries to get identifier from string

Added by Krzysztof Kasprzyca over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Form Framework
Start date:
2018-04-04
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

Description

Hello,

I think there is a problem which shouldn't exist. When I add additional configuration to EXT:form with allowedExtensionPaths pointing to folder with *.yaml forms and one of the files are empty/unable to parse I receive error page in backend module.

Message is "Call to a member function getCombinedIdentifier() on string".

Problem is in typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php line 114. Variable $file has string type so it isn't possible to retrieve file identifier

Best regards
Krzysztof Kasprzyca

trish_formtest_1.0.0.zip - Simple yaml parsing test extension for this bug (2.76 KB) Patricia Tiedemann, 2018-04-12 15:31

Associated revisions

Revision 2081a5d6 (diff)
Added by Susanne Moog 5 months ago

[BUGFIX] Catch form errors and display speaking error message

When having a broken form configuration, the formEditor is not able
to load because of JavaScript errors. These errors are not fixable for
an editor as they most likely happen because of admins/integrators
changing and breaking the form. Instead of displaying a loading
indicator without a hint on the error that happened, a top level
catch displaying a flash message has now been implemented.

Resolves: #84595
Releases: master, 9.5
Change-Id: I44cf49d8e344629bc1a3250eade6267c7debdf00
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60598
Tested-by: TYPO3com <>
Tested-by: Mathias Brodala <>
Tested-by: Ralf Zimmermann <>
Reviewed-by: Mathias Brodala <>
Reviewed-by: Ralf Zimmermann <>

Revision 27b1f358 (diff)
Added by Susanne Moog 5 months ago

[BUGFIX] Catch form errors and display speaking error message

When having a broken form configuration, the formEditor is not able
to load because of JavaScript errors. These errors are not fixable for
an editor as they most likely happen because of admins/integrators
changing and breaking the form. Instead of displaying a loading
indicator without a hint on the error that happened, a top level
catch displaying a flash message has now been implemented.

Resolves: #84595
Releases: master, 9.5
Change-Id: I44cf49d8e344629bc1a3250eade6267c7debdf00
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60602
Tested-by: TYPO3com <>
Tested-by: Ralf Zimmermann <>
Reviewed-by: Ralf Zimmermann <>

History

#1 Updated by Patricia Tiedemann over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Patricia Tiedemann

#2 Updated by Gerrit Code Review over 1 year ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56640

#3 Updated by Patricia Tiedemann over 1 year ago

I created a little patch to prevent this.

Added to this ticket is a simple testing extension with one working and one broken yaml form configuration.

To recreate:
  • Install Extension trish_formtest (creative name, I know ;)
  • Page > Create new content element > Form elements
  • Tab "Plugins" > Select "Form definition" should now contain "Call for papers" and "An error occured…"

Without this patch an exception will be thrown saying "Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function getCombinedIdentifier() on string" whenever you try to create a form content element on any page or try to view a page or content element in the backend where this broken form was already inplemented.

#4 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56640

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 35 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#6 Updated by Gerrit Code Review over 1 year ago

Patch set 36 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#7 Updated by Gerrit Code Review over 1 year ago

Patch set 37 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#8 Updated by Gerrit Code Review over 1 year ago

Patch set 38 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#9 Updated by Gerrit Code Review over 1 year ago

Patch set 39 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#10 Updated by Gerrit Code Review over 1 year ago

Patch set 40 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#11 Updated by Gerrit Code Review over 1 year ago

Patch set 41 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#12 Updated by Gerrit Code Review over 1 year ago

Patch set 42 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#13 Updated by Gerrit Code Review over 1 year ago

Patch set 43 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#14 Updated by Gerrit Code Review over 1 year ago

Patch set 44 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56028

#15 Updated by Bjoern Jacob over 1 year ago

  • Sprint Focus set to On Location Sprint

#16 Updated by Bjoern Jacob over 1 year ago

  • Sprint Focus changed from On Location Sprint to Remote Sprint

#17 Updated by Bjoern Jacob 11 months ago

  • Status changed from Under Review to New
  • Assignee deleted (Patricia Tiedemann)
  • Sprint Focus deleted (Remote Sprint)

#18 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60598

#19 Updated by Susanne Moog 5 months ago

  • Assignee set to Susanne Moog
  • Target version set to Candidate for patchlevel
  • TYPO3 Version changed from 8 to 9
  • Sprint Focus set to Remote Sprint

The original PHP error does not occur anymore, however when breaking forms on purpose the JavaScript is unable to fully load and has no editor friendly error handling. That's fixed with the patch to at least display a speaking message in case an error occurs.

#20 Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60598

#21 Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60602

#22 Updated by Anonymous 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#23 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF