Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8463007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:20:42+00:00 2026-06-10T14:20:42+00:00

For example the delete-link was clicked twice or from different users. While the first

  • 0

For example the delete-link was clicked twice or from different users. While the first click will correctly remove my object the second one will fail (as it is outdated) before my deleteAction is Called. How can I prevent this?

/**
 * action delete
 *
 * @param $upload
 * @dontvalidate $upload
 * @return void
 */
public function deleteAction(Tx_MyExt_Domain_Model_Upload $upload) {
    $this->uploadRepository->remove($upload);
    $this->flashMessageContainer->add('Your Upload was removed.');
    $this->redirect('list');
}

I get an Exception:

The value must be of type “Tx_MyExt_Domain_Model_Download”, but was of type “NULL”.

Doing something inside the action doesn’t help, because it fails before…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:20:44+00:00Added an answer on June 10, 2026 at 2:20 pm

    I’m assuming you have some fluid markup that looks like:

    <f:link.action action="delete" arguments="{upload:uploadObjectToDelete}" > ... 
    

    Which says: pass the uploadObjectToDelete object to the delete action when the user clicks on this link. And when the user clicks on that link the ExtBase PropertyMapper uses the arguments sent with the link to locate the uploadObjectToDelete in the database to hand it off to your controller and the delete action.

    After the first click, that delete action successfully deletes the object from the database and the page is reloaded when you redirect to the list action. However, this time the uploadObjectToDelete object is null. So, for the second click, when the PropertyMapper tries to locate an upload argument for the delete action there is no object to look for. And since the upload argument is required (i.e. can’t be null), you get an exception.

    Option 1

    Change your list action so that it doesn’t show these links when the uploadObjectToDelete object is null. This is probably the best option.

    <f:if condition="uploadObjectToDelete">
        <f:link.action action="delete" arguments="{upload:uploadObjectToDelete}" > ... 
    </f:if>
    

    Option 2

    Change your delete action to accept null arguments:

    public function deleteAction(Tx_MyExt_Domain_Model_Upload $upload = null) { ...
    

    But this option doesn’t make sense. Why would you allow your user to try and delete an object that is already null?

    These are just suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, let's say I want to delete from the array all continuous segments
When I acesss http://example.com/users/1/messages/new it says undefined method `error_message_on' for #<#<Class:0x00000005921d50>:0x0000000591e448> If I delete
I want to do different action for each submit button. For example compare will
For example, in admin cp, to delete user, there is a link - http://example.com/acp/delete-user.php?id=102
Im currently validating 3 times. Example delete link is only allowed to super upers.
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
In wiki article for REST it is indicated that if you use http://example.com/resources DELETE,
Can someone give me an example of how I would delete a row in
Is it possible to delete files using WebDav by file name pattern? For example,
I want to delete part of a record. For example, a column called message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.