finnlesueurgmailcom - 1 month ago

Hey all,

I'm trying to add an image field to the settings of a theme and am getting this error when I try view the settings:

An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("Trying to get property of non-object").").").

My settings.php looks like this:

"logo" => [
        "type"   => "anomaly.field_type.image",
        "config" => [
            "folders" => [
                "theme"
            ],
        ]
    ],

Any help would be appreciated :) I'm not writing any custom views etc, but am just trying to use the Settings module.

Cheers!

Answer

ryanthompson - 1 month ago

Can't use it in settings yet. I've got an idea to support this stuff in that way (single column storage) but I can't offer you anything yet. Image FT uses 2 columns. One for the ID of the file and one for the relation. Because of the Laravel relation to the file.

ryanthompson - 1 month ago

Can't use it in settings yet. I've got an idea to support this stuff in that way (single column storage) but I can't offer you anything yet. Image FT uses 2 columns. One for the ID of the file and one for the relation. Because of the Laravel relation to the file.

finnlesueurgmailcom - 1 month ago

Ah yeah thanks @ryanthompson! I've heard that the file_field-type can be used as a workaround so I'll give that a shot for now.