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: Deleting Translation Causes PHP Error

Status Resolved
Add-on / Version Publisher 1.1.4
Severity Trivial
EE Version 2.7.2

Christian Maloney

Jan 21, 2014

I’m getting this when I try to delete a translation.

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Publisher_model::$default_lang_id

Filename: publisher/ext.publisher.php

Line Number: 401
#1

BoldMinded (Brian)

This is already fixed for the next release. In the mean time you can make this small change:

diff --git a/third_party/publisher/ext.publisher.php b/third_party/publisher/ext.publisher.php
index 6321dc8d23ee99faff9ba549d7944955f122d35c..4ed70ba408d4177e2b5a42759e155912c225f82f 100644
--- a/third_party/publisher/ext.publisher.php
+++ b/third_party/publisher/ext.publisher.php
@@ -395,7 +395,7 @@ class Publisher_ext {
         {
             ee()->publisher_entry->delete_translation(ee()->input->post('entry_id', TRUE), ee()->input->post('site_language', TRUE));
             $redirect = TRUE;
-            $lang_id = ee()->publisher_model->default_lang_id;
+            $lang_id = ee()->publisher_lib->default_lang_id;
         }
 
         // Delete an the approval if it exists, b/c we just accepted the draft...
#2

Christian Maloney

Great, Thanks.

Login to reply