k2 icon indicating copy to clipboard operation
k2 copied to clipboard

Cannot clear embedVideo field after it was set once

Open keep opened this issue 4 months ago • 1 comments

Description: If we fill the embedVideo field of an item once, it is impossible to clear it later.

Steps to reproduce:

  • Edit a K2 item and add any value to the embedVideo field.
  • Save the item.
  • Reopen the item, delete the content of the embedVideo textarea and save.
  • The previous video value returns – it cannot be cleared.

Technical details: K2ModelItem has this logic: ` if (JRequest::getVar('embedVideo', '', 'post', 'string', JREQUEST_ALLOWRAW)) { $row->video = JRequest::getVar('embedVideo', '', 'post', 'string', JREQUEST_ALLOWRAW); }

` Because of the if condition, an empty string never reaches $row->video, so the field cannot be reset.

Expected behavior: If the user clears the field, the value in the database should also be cleared.

keep avatar Aug 06 '25 12:08 keep

Hi. Any update on this one? 🙂

keep avatar Nov 01 '25 14:11 keep