All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: language switcher transaltion

Status Resolved
Add-on / Version Publisher 1.7.4
Severity
EE Version 2.11

Cameron Ross

Jan 11, 2017

Hi

Example url:
http://dev.eufic.org/en/food-production/article/process-contaminants-in-vegetable-oils-and-foods

we are adding our different language versions.
so using the above url when i switch to the german version for example i am getting a page not found message
http://dev.eufic.org/en/food-production/article/process-contaminants-in-vegetable-oils-and-foods

as its automatically translating the template name.
http://dev.eufic.org/de/lebensmittelproduktion/article/transparenz-in-der-lebensmittelkette-vergangenheit-gegenwart-und-zukunft

but i havent added any template transaltions

When i try to add template translations

i get

Error Number: 1366

Incorrect integer value: ‘’ for column ‘parent_id’ at row 1

INSERT INTO `exp_publisher_templates` (`type`, `type_id`, `lang_id`, `parent_id`, `translated_name`, `route`) VALUES (‘group’, 1, 2, ‘’, ‘’, ‘’)

Filename: third_party/publisher/models/publisher_model.php

Line Number: 112

Thanks

#1

Cameron Ross

this is my code

{exp:publisher:languages}
      <option value="{switch_language_url}"  {if is_active == 1}selected{/if}>{short_name} - {long_name}</option>
   
   {/exp:publisher:languages}
#2

BoldMinded (Brian)

What version of php and MySQL?

#3

Cameron Ross

PHP Version 7.0.8 mysqlnd 5.0.12

#4

BoldMinded (Brian)

Go to line 846 of models/publisher_template.php and change it from

$parent_id = '';

to

$parent_id = 0;

See if that stops the error.

Regarding the template already being translated, that isn’t the case. Its translating that part of the URL b/c it is an entry URL Title.

#5

Cameron Ross

thanks

error has gone away but when i save template translations the values i enter do not save

on the top nav (using navee guide option) my first link is food production

http://mywebsite.com/en/food-production

food-production is the template name if i switch to es the link changes to http://mywebsite.com/es/producción-de-alimentos the template gets translated but i dont have this translation saved anywhere?

#6

BoldMinded (Brian)

Glad the error is gone. Regarding everything else, I’m going to need a lot more information. Sounds like you’re using NavEE, but you didn’t state which nav menu you were editing or provide detailed steps to replicate it. Please include screenshots of what you are describing.

#7

Cameron Ross

regarding the error “error has gone away but when i save template translations the values i enter DO NOT SAVE”

they are blank when i go back into template transactions

ok so i have a a navee menu called “Main Nav Food production”

for the primary food-production link i am using the template guided option and i have selected the template “food-production/index”

this is all good

my default language is english

i have no translations added for this template

if i switch to a different language the food-production template gets translated for some reason and i get a 404

http://dev.eufic.org/cs/produkce-potravin

this only happens for food-production

#8

BoldMinded (Brian)

Have you tried saving the site on a different server? Perhaps a different version of MySQL? What is MySQL’s strict mode set to?

If food-production is getting translated, it means there is either an entry or category or something that already has a translated value, and Publisher is using it. Due to how segments are used in EE, Publisher doesn’t know if segment 1 is supposed to be a template group, a template in the default group, a url title, or a category, so it goes through each and if it finds a translation it uses it. This sounds more like a content/template architecture issue than a bug, and unfortunately I don’t have a recommendation on how to work around it b/c it would involve me having a deep understanding of your site.

#9

Cameron Ross

thanks

ok there was a separate category group called news that’s not assigned to the food production channel or has no relation to the food-production section of the website. The translation was in the language settings-categories section

So published doesn’t know that the segment from navee is a template as i used the guide option in navee? or that the category group that food production was translated in is not assigned to that channel?

One last question:

Does published check against the category name or category url when lookimg for translations?

#10

Cameron Ross

Comment has been marked private.

#11

BoldMinded (Brian)

Do you have a development server? Or is everything done in production? At the very least I need to know what MySQL settings are, otherwise I’m shooting in the dark and making guesses. Debugging is a process of removing guessing and narrowing down the cause.

#12

BoldMinded (Brian)

Can you setup the site on a local MAMP/WAMP installation and try it there? If the site is in Subversion or Git this shouldn’t be a difficult thing to do.

#13

Cameron Ross

i have very little access to the server and i cannot get a backup to create a MAMP/WAMP installation

i have requested a copy of the mycnfg file

will send this as soon as i can get it

#14

Cameron Ross

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

#15

Cameron Ross

mysql> select @@sql_mode -> ; +————————————————————————————————————————+ | @@sql_mode | +————————————————————————————————————————+ | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +————————————————————————————————————————+ 1 row in set (0,02 sec) mysql>

#16

BoldMinded (Brian)

I changed my environment to PHP 7.0.12 and set MySQL’s mode to exactly what you have noted above, and could not replicate the issue. Template translations saved fine for me.

#17

Cameron Ross

Ok thanks.

#18

BoldMinded (Brian)

A thought occurred to me. Try increasing your max_input_vars setting in the php.ini to 5000 or 10000.

https://www.dropbox.com/s/1l8wr30ynpw00r2/Screenshot 2017-01-20 07.54.20.png?dl=0

#19

BoldMinded (Brian)

And increase your memory limit… 30 is really really low. Try 64 or 128.

#20

Cameron Ross

thanks will try it

Login to reply