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: Use of search:field_name={segment_2}

Status Resolved
Add-on / Version Publisher 3.5.1
Severity
EE Version 6.2.6

Mephics (T) Ltd

Apr 12, 2022

I am trying to get channel entry using this tag “search:field_name={segment_2}” on my channel entries tag, it give results on default language, but no results on the other language so its has like something like this…

I have tried several ways using the tags but still can get the 2 language to get results
{exp:channel:entries channel="publications" status="open" limit="1" search:qr_code="{segment_2}” 
{title}, {body}, {attach}
{/exp:channel:entries}

as well as
{exp:publisher:search qr_code="{segment_2}”}
  {exp:channel:entries entry_id="{entries}” limit=“1”}
      {title}, {body}, {attach}
  {/exp:channel:entries}
{/exp:publisher:search}

I have also install “URL Helper” and use the tag qr_code=”{last_segment}”}

 

#1

BoldMinded (Brian)

I think you need this: https://docs.boldminded.com/publisher/docs/template-tags#exp-publisher-search

#2

Mephics (T) Ltd

Comment has been marked private.

#3

BoldMinded (Brian)

I just did a test locally to confirm the publisher:search tag works as expected. Did you try it without {segment_2} as the parameter? Did you put the value you expect {segment_2} to be into the tag and see what the results are?

#4

BoldMinded (Brian)

I’m beginning to wonder if your initial installation worked correctly. Go to the Utilities > Database Sync page and see if it looks like this:

https://www.dropbox.com/s/c40nox73iw8aree/ticket-2396.png?dl=0

#5

BoldMinded (Brian)

I just logged into your CP and took a look, and that page looks fine.

How much non-default language content have you entered? If non or very little I’m wondering if it’s worth going back to a version of your database prior to installing Publisher, grabbing the latest 3.5.2 version, and re-installing it. If you’ve done a lot of development work that work would be lost, so this may not be possible.

#6

Mephics (T) Ltd

Since i had an issue with assets field in second language last time, i have to re-attach quite a number of attachment manually on second language more than 400 entries, so i am afraid reinstalling publisher, however i have tried to install it in my localhost, it seem the same issue using both {segmet_2} and well as manually have search keyword as seen below

{exp:publisher:search qr_code=”{segment_2}”} {exp:channel:entries entry_id=”{entries}” limit=“1”} {title}, {body}, {attach} {/exp:channel:entries} {/exp:publisher:search}

as well as

{exp:publisher:search qr_code=”WERWERRY”} {exp:channel:entries entry_id=”{entries}” limit=“1”} {title}, {body}, {attach} {/exp:channel:entries} {/exp:publisher:search}

Still its not giving me PROPER RESULTS in the second language!, in my case since we search a particular word (qr_code) it suppose to give me i results with this particular qr code

#7

BoldMinded (Brian)

Have you tried other search terms? Based on what I can see locally the publisher:search tag is working as expected and I don’t have any reason to doubt it. Are you 110% sure the words you’re searching for are in the expected field in the database? E.g. is it in the exp_publisher_datal_field_X table where X is the ID of the field you’re searching?

#8

Mephics (T) Ltd

Comment has been marked private.

#9

BoldMinded (Brian)

You didn’t really do anything I asked. Did you try searching for text from a different field on a different entry? What have you done to test this besides just testing the qr_code field? Did you look in the database for those values you’re searching on to make sure they exist?

#10

Mephics (T) Ltd

I have tried also using ‘body’ as search field but it only returns default language entry, i have look into the database and found out that the qr_code entries are stored in the table exp_publisher_data_field_82

{exp:publisher:search body=’mandate’} {exp:channel:entries entry_id=”{entries}” limit=“1”} {title}, {body} {/exp:channel:entries} {/exp:publisher:search}

#11

Mephics (T) Ltd

or maybe we can hard corded to get results,..

#12

BoldMinded (Brian)

Comment has been marked private.

#13

BoldMinded (Brian)

Comment has been marked private.

#14

Mephics (T) Ltd

Ok, thanks i now understand that one has to switch language upon search!

Login to reply