Code Monkey home page Code Monkey logo

Comments (16)

NamelessCoder avatar NamelessCoder commented on July 3, 2024

Agree. And might I add: damn you, FAL, for throwing an exception instead of returning NULL in so many unnecessary cases.

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

Ah, FAL again. Anything you/we can do here on our side?

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

Anything you/we can do here on our side?

Let's find out :)

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

Moving files via fileadmin leads to the same exception. I thought that's what FAL is all about...?

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

I thought that's what FAL is all about...?

Beats me. The most I've gotten out of it so far is new Exception types in new and exciting places.

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

This particular exception is thrown after getSingleField_typeFlex_draw() is invoked in the override class. Could be caught there of course, but what then? And do you think it is worth the effort to check which exceptions might be raised as well to create a plan? Questions for the weekend ;)

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

I think the fix will probably confuse a bit, but it's certainly better than an uncaught exception. We can wrap \TYPO3\CMS\Backend\Form\FormEngine::getSingleField_SW and catch this particular type of exception, if caught we can attempt to fix the field value before attempting re-render.

Ugly.

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

Does the Exception by any chance contain a property with the name of the file...?

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

Only in the exception trace. It's a dumb exception :\

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

I think I have a solution for it - but it's not pretty; it removes the entire value if a FileNotFoundException is encountered. It's better than the Exception, but still not a very friendly thing to do. I was hoping for a way to detect the individual file that's failing and only remove it :/

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

How is this one treating you, Björn? Too drastic...?

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

The current behavior without your patch is too drastic =) I think this is an edge case and FluidTYPO3 can't save the world so I'm fine with this.

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

Perhaps one last thing. Adding a FlashMessage when this happens, including a dump of the old field value.

from flux.

bjo3rnf avatar bjo3rnf commented on July 3, 2024

Sure, even better. In the end it's a user's fault that raises the exception but this way she knows why.

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

In the end it's a user's fault

I actually blame FAL - those references should be stored and warned about when removing FAL files; they are in other contexts. But then again, this reference being inside a FlexForm does relieve them of a small part of that blame :)

from flux.

NamelessCoder avatar NamelessCoder commented on July 3, 2024

Closing this one - solved by the merged PR :)

from flux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.