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: Unexpected results when non-default language has contents for an optional field that the default doe

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version

BoldMinded

Jul 01, 2013

* I am in development mode, as I want English to fill in where Chinese is not present.
* I have a optional field: cf_page_title
* In my English default it is empty, however, in the Chinese version, it has a value.
* When I try to parse {cf_page_title} in the template, with the language set to Chinese, I get an empty string. However, if give the english version a value, it is parsed correctly.

I don’t seem to be able to consistently reproduce this part - but it seems like if I saved the version as Chinese, then looked at the site, the field would render the Chinese, but if I then resaved the English version it would show the empty string again, even when in Chinese.

#1

BoldMinded (Brian)

Hey Tim, which version of Publisher are you using?

#2

Timothy Kelty

1.0.1, but was seeing it before as well, pretty sure.

#3

Timothy Kelty

I also have both your EE core hacks for 2.6.1.

#4

BoldMinded (Brian)

In all honesty I’m not sure this is something I planned for. There was an issue I fixed for 1.0 where draft content wasn’t showing properly and thought it was related to this, but actually I didn’t think about this scenario. It was assumed if the field is blank in the default language, then its blank in the other languages to, thus sticking to the 1 to 1 relationship.

#5

Timothy Kelty

Ok, that’s fine. Wasn’t sure if it was by design or a bug.

Should be a simple enough fix for us to just require our alt title field. Thanks for the quick response, as always!

#6

BoldMinded (Brian)

I can look into changing this behavior. The only issue is that if you try to use that field in a conditional, it won’t return true if the default language field value is empty. Thats the field value that is used by the template parser. The only way to reliably change that is to put the translated value into the default table, but it would be the translated value of the last saved language, so the fallback lookups could get tricky.

#7

Timothy Kelty

Relavent settings are as follows:

Translation mode: Development Force default language: no Get language from browser: yes Add URL prefix: yes Force URL prefix: yes

#8

Timothy Kelty

Looks like the culprit is $matchingGrade = $this->matchLanguage($acceptedValue, $availableValue);. It’s 0, when it it shouldn’t be.

#9

Timothy Kelty

ignore my last 2 comments…wrong issue!

Login to reply