I have a strange issue I can't find reference to anywhere on Google!

The following code allows me to display a Safecracker form to edit an entry. When I click save I get the error below.


        <label for="title">Title</label>
        <input name="title" type="text" value="{title}">

        <label for="title">Summary</label>

        <label for="title">Content</label>

    <input type="submit" value="Submit">


This is the error:

The form you submitted contained the following errors


I find this strange because I am the author of the entry, it wont even show the edit form to other entries I am not the author of, so author_only="yes" seems to be working with that respect. But clicking save its as if it then thinks I am not the author.

Removing author_only="yes" will allow me to edit AND save, any form, which is obviously bad.

So I am not sure what the issue is. Using v 2.6.1

2 Answers 2


Your code looks right. Trust me, author_only does work. First rule out the obvious: In your safecracker form, output {author_id} and {member_id} and make sure they match. Second, suggest checking member group settings that you can edit entry

  • {author_id} and {member_id} are the same, and the group IS allowed to Post and Edit channel entries for this channel. Thats the weird thing, it allows me on the edit screen (which it would not if any of the above are not true), its only after Save does is then show this error. Commented Aug 19, 2013 at 13:22
  • Ive just again looked at my code - same params except i dont use inline errors. In source code, search for 'safecracker_author_only'. Youll find two refs only, both in safecracker_lib.php. You are failing one of these conditions. Comment out some of these conditionals until you get a pointer on where the problem is.
    – Lloyd Hill
    Commented Aug 19, 2013 at 23:54
  • This is the problematic conditional: $this->entry('author_id') != ee()->session->userdata('member_id') But $this->entry is empty Commented Aug 20, 2013 at 12:09
  • Looks like fetch_entry() requires the URL title passed, but $this->_meta['url_title'] is empty. Commented Aug 20, 2013 at 12:30

Ok, I've been able to replicate the same issue in my setup up and solved it with a plugin as follows:

{exp:yak_bus:grant_access url_title = "{segment_3}"}{if response == "no"}{redirect="access/not_authorised"}{/if}{/exp:yak_bus:grant_access}

public function grant_access ()
    $url_title = (ee()->TMPL->fetch_param('url_title') != '') ? ee()->db->escape_str(ee()->TMPL->fetch_param('url_title')) : FALSE;

    if ( ! $url_title) return;

    $query = ee()->db->query("SELECT url_title, author_id 
        FROM exp_channel_titles 
        WHERE url_title = '" .$url_title . "'");

    if ($query->num_rows == 0 )
        // not a valid url - so could be another page within mybusiness, thats ok

    if ($query->row('author_id') != ee()->session->userdata('member_id'))
        $vars = array('response' => 'no');
        return $this->return_data = ee()->TMPL->parse_variables_row(ee()->TMPL->tagdata, $vars);


And if you need a start with a plugin pkg,io

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.