Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: PHP errors while creating new entry via channel:form

Status Resolved
Add-on / Version Publisher 1.6.4
Severity
EE Version 2.10.1

FinEEuser

Jun 22, 2015

Description:

Im having a minor issue with my channel form.
The form is ment to create new entry instead of editing one.
(when editing entries dont get the errors because entry_id is present).
Using latest EE 2.10.1, with Publisher 1.6.4 running on php5.6.2.

EE’s docs states that when channel form doesnt find entry_id,
it will create new entry, and because Publisher is somehow checking things againts entry_id,
errors are thrown because there is no entry_id available.
Ref:
https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_form/#entry-id

Publisher template tag page is not telling nothing for channel:form when it is about creating new entry instead of editing one.
Ref:
https://boldminded.com/add-ons/publisher/template-tags


Here is the opening tag for channel:form I have now:

{exp:channel:form channel="tapahtumat" include_jquery="no" datepicker="no" class="form-horizontal" author_only="yes" cache="no" return="{phrase:uustapahtuma}/ENTRY_ID"}
           
                                            <input type="hidden" name="lang_id" value="{publisher:current_language_id}">
                                            <input type="hidden" name="publisher_view_status" value="open">
                                            <input type="hidden" name="publisher_save_status" value="open">


Errors what I get are:

A PHP Error was encountered
Severity: Notice
Message: Undefined index: entry_id
Filename: publisher/ext.publisher.php
Line Number: 594

A PHP Error was encountered
Severity: Notice
Message: Undefined index: entry_id
Filename: publisher/ext.publisher.php
Line Number: 601

I do not have drafts enabled, Im using Publisher purely for translating content.
Browser console shows no JS errors or other errors.
I have stripped all html down using just html/body and the channel:form == still getting those errors
I have no categories on the channel in use.
It is very likely that Publisher try in all possible scenarios to find ENTRY_ID but because the channel:form will create new entry when there is no ENTRY_ID available, those PHP errors are thrown.


Detailed steps to reproduce the issue:
1. create new channel form with the opening tag similar to above
2. use SuperAdmin account for the page when trying to create new entry (regular users do not see errors).

 

#1

BoldMinded (Brian)

Comment has been marked private.

#2

FinEEuser

That build seemed to fix it as far as I did one test. If I spot something related, will let you know. Thank you.

Login to reply