EE4 compatibility updates:

  • Publisher is EE4 and EE5 compatible, but it does not currently support the Fluid field.
  • Reel is EE4 and EE5 compatible, but it does not currently support the Fluid field.

Ticket: Publisher hooks, for the webservice module

Status Resolved
Add-on / Version Publisher n/a
Severity
EE Version n/a/

Rein

Nov 26, 2018

Hi Brain,

How are you doing?

I have currently a ticket request for integrating Publisher better within the webservice module. Im the Webservice Module i use the native Entry models to search an entry. When publisher is installed and you search on a translated entry, it will look with the native modules in the channel_data table and not in your tables. Is it possible to search an entry with a translated phrase?

For example, we have a site with 2 languages. (EN and NL) The default language is EN and we have one entry translated to NL. is it possible to do something like this.

ee(‘Model’)->model(‘ChannelEntry’)->filter(‘field_id_3’, ‘welkom’). Where you would normally do ee(‘Model’)->model(‘ChannelEntry’)->filter(‘field_id_3’, ‘welcome’)

let me know.

Best,
Rein

#1

BoldMinded (Brian)

Nov 26, 2018

You can try using ee(‘Model’)->model(‘publisher:EntryTranslation’), but I personally haven’t tested it with the ->filter() method.

#2

Rein

Nov 26, 2018

Comment has been marked private.

#3

BoldMinded (Brian)

Nov 26, 2018

You can download the free trial.

#4

Rein

Nov 27, 2018

Ofcourse…

Is it possible to create a relation from “publisher:EntryTranslation” to “ee:ChannelEntry”?

Im using your model as a with ‘->with(“publisher:EntryTranslation”)’ in my code and because there is no relation from “publisher:EntryTranslation” to “ee:ChannelEntry”.

The following error popups:

Undefined index: publisher:EntryTranslation
ee/EllisLab/ExpressionEngine/Service/Model/RelationGraph.php, line 64

Is it possible for you to create such relation?

Let me know.

#5

BoldMinded (Brian)

Nov 27, 2018

Rein, I don’t think I’ll be prioritizing such a change b/c there are other more demanding things that need my attention, but if you’d like to submit a diff I’d be happy to take a look at it and potentially integrate it.

#6

BoldMinded (Brian)

Nov 28, 2018

I’m not sure you’ll be able to easily create a relationship between the two without manipulating the database. EntryTranslation uses a composite key, which EE’s native models have literally no concept of (which is a core design issue if you ask me), which is why I had to overload the save() function in EntryTranslation. Because of this using EE’s $_relationships property on the model may not work. You can try, but I have a feeling it won’t.

#7

BoldMinded (Brian)

Dec 04, 2018

Rein, not sure if you saw my latest tweet, but I’m working on Publisher 3, which will include a migration of the publisher_data table to separate tables for each field, so the underlying data model will be very similar to other EE fields. I still think the lack of composite key support in EE’s models means that I doubt I can fully support the ->filter() method. It may be easier for me to add an array option to the Service/Entry/Entry->find() to do the filtering.

#8

Rein

3 days ago

Hi Brian,

Thanks, thats looks promising.

However, currently there is a bug inside the model service when using ‘->with()’

https://github.com/ExpressionEngine/ExpressionEngine/issues/31

You can close this issue as the bug has nothing to deal with publisher wink

Best,
Rein

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.