k2
k2 copied to clipboard
Cannot clear embedVideo field after it was set once
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.
Hi. Any update on this one? 🙂