We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Array to string conversion when Creating New Entry or Editing Existing Entry

Rachel Shillcock October 11, 2014 by Rachel Shillcock

I've got two sets of entries on my website - one is to run my portfolio and one is to run my blog. The blog entries work perfectly and I can add new blog entries and edit existing ones easily.

However, on the portfolio entries I can't view/edit or add new portfolio entries via the Control Panel - at all. What's even stranger though is that this is only on my local environment via Mamp. It used to work - but doesn't anymore - but it works perfectly on my live site.

I've made sure that the files are exactly the same on both the server and the local folder and nothing is different. I'm running the latest version of Statamic and have also used the check.php to ensure that everything is set up correctly (it is). I haven't changed my local environment either - I use MAMP Pro and haven't changed any settings at all. I just noticed that this bit isn't working when I came to use it - it's not an area I use too often on my site, so I can't track when this stopped working really.

This is the error I get:

Array to string conversion

Open: /Users/rachilli/Sites/rachil.li/admin/themes/ascent/templates/publish.php

    // to set a meta/system field, like Content.
    $input_key = array_get($value, 'input_key', '[yaml]');
    $wrapper_attributes = array();
    $wrapper_classes = array(
    'input-' . $fieldtype
    if ( array_get($value, 'required', false) === TRUE) {

I've also checked all the config files - made sure that my yaml fieldsets use spaces instead of tabs (even though the blog entries use some of the same fieldsets and that hasn't mattered to those).

Not sure if there's anything else I can supply or any more info - but let me know if there is! I've checked other support tickets and no fixes there seem to help here. Let me know if you need any more info!

Thanks :)

Answered by Rachel Shillcock!
>>>>>>> Answered <<<<<<<
6 Replies