SpinaCMS / Spina

Spina CMS
http://www.spinacms.com
Other
2.19k stars 405 forks source link

Attachment attributes not set on select #746

Closed kahrpatrick closed 3 years ago

kahrpatrick commented 3 years ago

When editing a page with an attachment part, only the attachment_id (that is the value attribute of the option elements in the select element) is properly transmitted by the form. The two other hidden fields signed_blob_id and filename are not set and therefore empty.

https://github.com/SpinaCMS/Spina/blob/ba0763d5f7f26a5790f935c568943383858b2c8f/app/views/spina/admin/parts/attachments/_form.html.erb#L4

As a result, attachments cannot be accessed using the content helper when rendering a page.

Bramjetten commented 3 years ago

Thanks for figuring this out! Fixed in #749