Skip to content

Channel Form entries always return empty string for url_title #7

@joeczucha

Description

@joeczucha

As above (it works in the back end)

I've had a little look around:

In the entry_submission_end($entry_id, $meta, $data) function

$meta['url_title'] = ee()->api_channel_entries->_validate_url_title($url_title_name_out, $meta['title'], true); 

seems to be always be returning false.

The ee()->api_channel_entries->_validate_url_title function seems to be called twice, once with the original url_title and then with the updated url_title.

I guess this is to be expected (as it's being called by the original function, and again by the hooked version).

However the second time the value of $this->channel_id (in Api_channel_entries.php) is null, for some reason. This means that _unique_url_title function (in Api.php) fails, as the first line is:

if ($type_id == '') {
    return FALSE;
}

...so the URL is always returned as false.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions