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: Publisher error on search results

Status Resolved
Add-on / Version Publisher Lite 2.7.4
Severity
EE Version 4.0.9

Rob Allen

Feb 23, 2018

Hi

I’m using EE simple search form, when submitting a search I get a an error:

Exception Caught
SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: ‘exp_channel_titles’:
SELECT DISTINCT(exp_publisher_titles.entry_id), exp_publisher_titles.channel_id FROM exp_publisher_titles LEFT JOIN exp_channels ON exp_publisher_titles.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_titles ON (exp_channel_titles.channel_id = exp_channels.channel_id AND exp_publisher_titles.entry_id = exp_channel_titles.entry_id) LEFT JOIN exp_publisher_data ON exp_publisher_titles.entry_id = exp_publisher_data.entry_id LEFT JOIN exp_channel_titles ON (exp_channel_titles.channel_id = exp_channels.channel_id AND exp_publisher_titles.entry_id = exp_channel_titles.entry_id) LEFT JOIN exp_publisher_data _field_10 ON exp_publisher_data_field_10.entry_id = exp_publisher_titles.entry_id LEFT JOIN exp_channel_titles ON (exp_channel_titles.channel_id = exp_channels.channel_id AND exp_publisher_titles.entry_id = exp_channel_titles.entry_id) LEFT JOIN exp_publisher_data _field_5 ON exp_publisher_data_field_5.entry_id = exp_publisher_titles.entry_id LEFT JOIN exp_channel_titles ON (exp_channel_titles.channel_id = exp_channels.channel_id AND exp_publisher_titles.entry_id = exp_channel_titles.entry_id) LEFT JOIN exp_publisher_data _field_6 ON exp_publisher_data_field_6.entry_id = exp_publisher_titles.entry_id LEFT JOIN exp_channel_titles ON (exp_channel_titles.channel_id = exp_channels.channel_id AND exp_publisher_titles.entry_id = exp_channel_titles.entry_id) LEFT JOIN exp_publisher_data _field_14 ON exp_publisher_data_field_14.entry_id = exp_publisher_titles.entry_id LEFT JOIN exp_comments ON exp_publisher_titles.entry_id = exp_comments.entry_id LEFT JOIN exp_category_posts ON exp_publisher_titles.entry_id = exp_category_posts.entry_id LEFT JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE exp_publisher_titles.lang_id = 1 AND exp_publisher_titles.status = “open” AND exp_channels.site_id IN (‘1’) AND exp_publisher_titles.entry_date

< 1519389314 AND (exp_channel_titles.expiration_date = 0 OR exp_channel_titles.expiration_date >

1519389314) AND exp_channel_titles.status = ‘open’ AND ( (((exp_publisher_titles.title LIKE ‘%community%’ )) ) ) AND ( exp_publisher_titles.channel_id = ‘1’ OR exp_publisher_titles.channel_id = ‘2’ OR exp_publisher_titles.channel_id = ‘3’ OR exp_publisher_titles.channel_id = ‘4’ OR exp_publisher_titles.channel_id = ‘5’ OR exp_publisher_titles.channel_id = ‘6’ )

ee/legacy/database/drivers/mysqli/mysqli_connection.php:116
Stack Trace: Please include when reporting this error

  #0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(111): CI_DB_mysqli_connection->query(‘SELECT\n\t\t\tDISTI…’)
  #1 ee/legacy/database/DB_driver.php(269): CI_DB_mysqli_driver->_execute(‘SELECT\n\t\t\tDISTI…’)
  #2 ee/legacy/database/DB_driver.php(179): CI_DB_driver->simple_query(‘SELECT\n\t\t\tDISTI…’)
  #3 user/addons/publisher/legacy/libraries/Publisher_search.php(125): CI_DB_driver->query(‘SELECT\n\t\t\tDISTI…’)
  #4 user/addons/publisher/ext.publisher.php(715): Publisher_search->modify_search_query(‘SELECT\n\t\t\tDISTI…’, ‘47110217014c381…’)
  #5 ee/legacy/libraries/Extensions.php(227): Publisher_ext->channel_search_modify_search_query(‘SELECT\n\t\t\tDISTI…’, ‘47110217014c381…’)
  #6 ee/legacy/libraries/Extensions.php(122): EE_Extensions->call_class(‘Publisher_ext’, ‘channel_search_…’, Array, Array)
  #7 ee/EllisLab/Addons/search/mod.search.php(993): EE_Extensions->call(‘channel_search_…’, ‘SELECT\n\t\t\tDISTI…’, ‘47110217014c381…’)
  #8 ee/EllisLab/Addons/search/mod.search.php(223): Search->build_standard_query()
  #9 ee/legacy/libraries/Actions.php(208): Search->do_search()
  #10 ee/legacy/libraries/Core.php(523): EE_Actions->__construct(true, Object(Closure))
  #11 ee/legacy/controllers/ee.php(58): EE_Core->generate_action(true)
  #12 [internal function]: EE->index()
  #13 ee/EllisLab/ExpressionEngine/Core/Core.php(240): call_user_func_array(Array, Array)
  #14 ee/EllisLab/ExpressionEngine/Core/Core.php(109): EllisLab\ExpressionEngine\Core\Core->runController(Array)
  #15 ee/EllisLab/ExpressionEngine/Boot/boot.php(146): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
  #16 index.php(172): require_once(’...’)
  #16 index.php(172): require_once(’...’)

 

#1

BoldMinded (Brian)

Comment has been marked private.

#2

BoldMinded (Brian)

Comment has been marked private.

#3

Rob Allen

Comment has been marked private.

#4

BoldMinded (Brian)

What does your search form look like? Are you searching with categories or anything else or is it just a basic text search?

#5

Rob Allen

Comment has been marked private.

#6

BoldMinded (Brian)

What other add-ons do you have installed? I’m using basically the same form on the demo site and its working fine.

{exp:search:simple_form
    channel="cards"
    no_result_page="search/no-results"
    result_page="search/results"
    results="3"
    search_in="entries"
    where="all"
}
    <input type="text" name="keywords" placeholder="Search">
    <button type="submit">Go</button>
{/exp:search:simple_form}

http://demo.boldminded.com/search. You need to be logged in for the search to work. http://demo.boldminded.com/admin.php u: admin p: password

#7

Rob Allen

Comment has been marked private.

#8

BoldMinded (Brian)

Have you tried to replicate the issue in an environment with only Publisher installed? Or disabled those other add-ons 1 by 1 to see if the issue clears up? (backup your db first)

#9

Rob Allen

Comment has been marked private.

#10

BoldMinded (Brian)

That sounds fine. I’ll just keep it in client wait status.

#11

Rob Allen

Comment has been marked private.

#12

BoldMinded (Brian)

I think there is an exp_searches table. Delete all the rows from it.

#13

BoldMinded (Brian)

Rob I’m going to close this bc I haven’t heard anything in a few weeks and I’m unable to replicate.

Login to reply