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: Relationsship-file shown in second language even if persistence is off

Status Resolved
Add-on / Version Publisher 2.6.3
Severity
EE Version 3.5.11

Verve -Webdesign und Grafik

Sep 13, 2017

 

Hi
My installation has two languages de (main) and en.
I have a channel ‘downloads’ with all the files for a website. In an other channel I have a relationship field to the files.
Persistence for relationsship is off.

In the german entry I choose a file from the relationship-field. in the englisch entry the file is also choosed and even when I delete it, it is still shown on the website.
I also deleted the englisch version of the file in the downloads channel.

Is this normal? Do I have to choose at least one file per relationship-field. I don’t think so. What do you mean?
Thanks!

 

 

 

 

 

#1

BoldMinded (Brian)

Hi there. You said “it is still shown on the website” - I assume this means the front-end of your site and not in the CP?

#2

Verve -Webdesign und Grafik

Yes, it is like this. You can see it on the one of the screenshots.

#3

Verve -Webdesign und Grafik

But in the CP the File is also visible as choosen Option and cannot been deleted.

#4

BoldMinded (Brian)

I’m not seeing any screenshots. Can you attach a screenshot of the File field in the CP?

#5

BoldMinded (Brian)

Can you be more descriptive of what you’re doing? From what I understand you have a Relationship field that is not inside of a Grid or Bloqs, and that Relationship field is assigning an entry. Each language has a different entry assigned, and those entries have have a File field in them?

#6

Verve -Webdesign und Grafik

Sorry, tried to upload pdf’s. I edited the ticket and added the screenshots.

#7

BoldMinded (Brian)

On demo.boldminded.com I turned off Relationship Persistence, and added two different related entries on the Shards page. You can see it here (http://demo.boldminded.com/en/shards) and switch languages as well as login to the CP yourself. It looks like the assigned related entries are displaying correctly on each translated page.

I opened up the permissions on the demo site, so you should be able to login and create new custom fields now. Would you mind trying to replicate your issue on my demo site? You can add or edit existing templates to re-create the issue.

#8

Verve -Webdesign und Grafik

Yes, I will Made a template-group ‘verve_test’ but there is an Error and cannot create a template

Exception Caught No such method filter. Manager.php:143

#9

BoldMinded (Brian)

Try just using the index template in that group.

#10

Verve -Webdesign und Grafik

I would like to but I don’t see and cannot open the template because of the meant error.

#11

BoldMinded (Brian)

Comment has been marked private.

#12

Verve -Webdesign und Grafik

I tried around and cannot reproduce the error I have in my system. :( I have no idea why this is not working in my install.

Is there an other way to find out if the persistence setting is really working.

#13

Verve -Webdesign und Grafik

I deinstalled all the extensions, modules. Cleared the Cache. Tried the same in another channel. When I have at least choosen one file or more per language it works well. When I want to have zero file in the relationsshipfield it always copy the file from the german entry into the english one.

#14

BoldMinded (Brian)

Does it display any other information from the related entry? For example does it correctly show or not shot the title or any other custom field value? Or is this strictly an issue with the File field in a related entry?

#15

Verve -Webdesign und Grafik

There are two other fields showing correctly (title and a customfield for a description of the file).

#16

Verve -Webdesign und Grafik

I recognized: When I select no file in German (main language) and select a file in the English translation it works correctly. But not opposite.

#17

BoldMinded (Brian)

I’m having a little trouble following the issue. I’ve updated the demo site with what I think you’re trying to do. Login and go to the Pages > Cards entry (#2) and you’ll see that I assigned the entry “Snapcaster Mage” in the English version of the entry, and “Birds of Paradise” in the German version. If you look at those two entries (#5 and #20) you’ll see that they both have a file field and are each assigned a different image. It doesn’t matter what the file type is (you’re using a PDF, I’m using a PNG) it still works the same in the database.

The template isn’t rendering the image in an <img> tag, but you can see on http://demo.boldminded.com/en/cards if you switch languages that the image path does change, so it is loading a different file from an related entry. If I’m understanding your issue, this is what you’re trying to do, but I’m unable to replicate it. Initially it didn’t show the file path, but after I saved the two entries (Snapcaster Mage and Birds of Paradise) in German, the files worked.

Can you take a look at your site to make sure your entries containing the files are fully translated and have files assigned to each translation?

#18

Verve -Webdesign und Grafik

Thanks for your statement! I understand and can do the same without problems but the difference is, in my case it is not a file field. It is a relationsshipfield AND… I don’t want to have an related file in both entries. Only in my main language. This is what I also did in your installation yesterday and there it works perfect but not in MY installation.

If I do this in my install (on the main language German), it copies automatically the choosed file (from the relationshipfield) also to the English version of the same entry and I cannot delete it. But this happens only when I try to have NONE choosed file in the English Version (second language). When I add at least one file to each language of the entry it works fine.

When I just choose a file in the second language version (en) it even works without choosing a file for the main language (de). Very strange.

#19

BoldMinded (Brian)

I’m not sure why it worked on demo.boldmined.com but you’re having trouble on your site. It appears to be working as intended on demo.boldminded.com. If you want to assign a related entry in a default language and have the same related entry (and same file) to appear in the other languages, then you need to turn off persistence. You may just need to assign the file to each language if you want it to work the way you’re expecting.

#20

Verve -Webdesign und Grafik

Have you seen the screenshots I added to the ticket? I am talking about things happening in the Control Panel first.

Ich have this relationshipfield in one channel where I choose a file from for the german version of the entry. And in the englisch versioin of the same entry I don’t want to have ANY FILE from the relationshipfield (because there is also no such english file in the database (therefore I set the option in persistence to no) But this is not possible because the german file will also shown as CHOOSEN in the english entry and I cannot make it unselected. More explanation about behaving of Publisher see #18

Sorry, if my english is not enough understandable.

#21

BoldMinded (Brian)

Take a look at your Content Settings and turn off CP Fallback, then see if that has the desired effect.

#22

Verve -Webdesign und Grafik

Yees, I think this is it. But when I remember correctly I had not to switch this to ‘NO’ in your install. Anyway… Will check it again with other entries in my install. Thx again.

Login to reply