We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Live preview errors with 4.1.0-dp3

Developer Preview

Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

Getting this:

Notice

Trying to get property of non-object

ee/EllisLab/ExpressionEngine/Controller/Publish/Publish.php, line 392

Severity: E_NOTICE Notice

Trying to get property of non-object

ee/EllisLab/ExpressionEngine/Controller/Publish/Publish.php, line 392

Severity: E_NOTICE Notice

Trying to get property of non-object

ee/EllisLab/ExpressionEngine/Controller/Publish/Publish.php, line 393

Severity: E_NOTICE Warning

array_key_exists() expects parameter 2 to be array, string given

ee/legacy/models/relationship_model.php, line 234

Severity: E_WARNING Warning

Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:111)

ee/EllisLab/ExpressionEngine/Boot/boot.common.php, line 491

Severity: E_WARNING

       
Derek Jones's avatar
Derek Jones
7,561 posts
7 years ago
Derek Jones's avatar Derek Jones

This looks Pages related; do you have that module installed? If so, what do you have set for the Pages URI and template for this entry?

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

I did. Only for “testing” purposes though. Don’t ask me questions about the page module, I have no idea how it works. Uninstalled and deleted if I could have.

       
Derek Jones's avatar
Derek Jones
7,561 posts
7 years ago
Derek Jones's avatar Derek Jones

So you can’t tell me how to replicate your error?

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

Aha, now I know why you won’t let me delete it.

The pages URI is empty and the template is Choose Wisely.

Now you owe me a fine bottle of oregon pinot.

       
Seth Barber's avatar
Seth Barber
172 posts
7 years ago
Seth Barber's avatar Seth Barber

Can you replace lines 374 and 375 of ee/EllisLab/ExpressionEngine/Controller/Publish/Publish.php with:

if ( ! empty($_POST['pages__pages_uri'])
   && ! empty($_POST['pages__pages_template_id']))
       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

This gives me a blank page instead. Also, the blue preview button is gone from the entry when the pages module is enabled.

       
Derek Jones's avatar
Derek Jones
7,561 posts
7 years ago
Derek Jones's avatar Derek Jones

Recheck from Seth’s edit. Also the preview button should appear once you have a Pages URI entered, OR have a preview template set for that channel.

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

After Seth’s edit I get this:

Warning

array_key_exists() expects parameter 2 to be array, string given

ee/legacy/models/relationship_model.php, line 234

Severity: E_WARNING Warning

Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:111)

ee/EllisLab/ExpressionEngine/Boot/boot.common.php, line 491

Severity: E_WARNING

       
Seth Barber's avatar
Seth Barber
172 posts
7 years ago
Seth Barber's avatar Seth Barber

Try changing line 234 of ee/legacy/models/relationship_model.php to

if (isset($data['field_id_' . $field_id]) && is_array($data['field_id_' . $field_id]) && array_key_exists('data', $data['field_id_' . $field_id]))
       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
7 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

Works!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.