yii2-taggable icon indicating copy to clipboard operation
yii2-taggable copied to clipboard

Taggs are not saved

Open malaynayak opened this issue 8 years ago • 3 comments

Hi Sjaak,

Thanks for this awesome widget. It really helped me a lot in my recent project.

I however found an issue that the tags are not saved after submitting the Article. I applied the hack code "$this->setEditorTags($owner->editorTags);" in the file TaggableBehavior.php line no 186 and the issue is resolved.

Please check the issue and correct me if I am wrong.

Thanks

malaynayak avatar Feb 26 '16 12:02 malaynayak

Thanks for your kind words.

I’m afraid I don’t understand what you mean. If there are any new tag names on submitting, they are saved in TaggableBehavior.php line 203. The pivot table is updated in lines 214 (remove deleted tags) and 226 (insert new tags).

Or am I missing something?


Sjaak Priester

mailto:[email protected] [email protected]

From: Malay Nayak [mailto:[email protected]] Sent: Friday, February 26, 2016 1:39 PM To: sjaakp/yii2-taggable [email protected] Subject: [yii2-taggable] Taggs are not saved (#9)

Hi Sjaak,

Thanks for this awesome widget. It really helped me a lot in my recent project.

I however found an issue that the tags are not saved after submitting the Article. I applied the hack code "$this->setEditorTags($owner->editorTags);" in the file TaggableBehavior.php line no 186 and the issue is resolved.

Please check the issue and correct me if I am wrong.

Thanks

— Reply to this email directly or view it on GitHub https://github.com/sjaakp/yii2-taggable/issues/9 . https://github.com/notifications/beacon/AFU71hMtaq2FscHPoyBAUZfCo6oHg4xpks5poD70gaJpZM4Hjv7X.gif

sjaakp avatar Feb 27 '16 12:02 sjaakp

Hi Sjaak, I ran into the same problem. When updating or creating a tag, they are not stored in the link table. The solution method that suggested malaynayak did not solve the problem

Thanks

xdeenist avatar Apr 23 '17 23:04 xdeenist

I had this problem. For decision Me helped this hint malaynayak. Just need to in property _tagList behavior across method setEditorTags() write down values obtained from the form. Else arrray data values of tags will by empty and will not be of save data.

Seeman13 avatar May 26 '18 17:05 Seeman13