jan-vince / smallrecords

OctoberCMS plugin to store and manage records and lists
MIT License
30 stars 11 forks source link

Error when save attribute's value #97

Open exaline-ru opened 2 years ago

exaline-ru commented 2 years ago

An error occurred when saving data in the attributes (October CMS v.2.2.10, SmallRecords v.3.14.0)

Call to a member function fill() on array" on line 87 of /public_html/modules/backend/traits/FormModelSaver.php

jan-vince commented 2 years ago

Hi,

I do not use OC2 yet so can't test it right now - but add this to my todo list!

Thanks for issue.

exaline-ru commented 2 years ago

Do you have a plan to upgrade to OC2?

jan-vince commented 2 years ago

Sure - when I have a time :)

exaline-ru commented 2 years ago

Thank you very much for the great plugin! I'm really looking forward to the update.

exaline-ru commented 2 years ago

In my opinion, you can watch this plugin (with a similar model), since it works in OC2

/plugins/ginopane/blogtaxonomy/models/PostType.php

afdstudio commented 2 years ago

Hi. I am experiencing the same issue while trying to save the attributes - OC2. Any solution on this? Thank you in advance!

exaline-ru commented 2 years ago

Any solution on this?

It still doesn't work! I'm using Notes now instead of attributes

afdstudio commented 2 years ago

Hi again!

Think this issue was fixed on backend. I can now add attributes. However, displaying attributes is not working. This code didn't work:

{% for attribute in record.attributes %}

{{ attribute.name }} : {{ attribute.value }}

{% endfor %}

Any suggestions to workaround with this? Thank you!

jan-vince commented 2 years ago

Try to dump values of record object with Twig Dump or other plugin.

Or you can try to use original RecordDetail component to render all record's data.