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: Simple Search form shows no results when Publisher Enabled

Status Resolved
Add-on / Version Publisher Lite 2.6.5
Severity
EE Version 3.5.11

derek allard

Nov 13, 2017

Description: When searching using a simple search form in Expression Engine, no results are returned when Publisher is enabled. When Publisher is disabled, results are returned as expected. I have read through the Publisher change log and noticed the following line in 2.5.1:

[Fixed] Simple Search form is fixed. Requires the “session_crypt_key” config variable be set.

I have confirmed that a “session_crypt_key” is set in config.php

Detailed steps to reproduce the issue:
1.Navigate to https://beta.gocanvas.com/content/blog/
2. Search for “mobile forms”
3. Notice no results
4. Login to backend
5. Disable publisher
6. Return to frontend
7. Search for “mobile forms”
8. Notice 827 results.

Here is what the EE simple search form currently looks like:

{exp:search:simple_form channel="blog" result_page="blog/search-results"  no_result_page="blog/search-noresults" search_in="everywhere" where="all" results="15"}
            
            <input class="form-control search-input" id="keywords" name="keywords" placeholder="Search Blog" type="text">
            <button name="commit" value="Search" type="submit" class="outline-0">
                <i class="fa fa-search text-muted"></i>
            </button>
            
            {/exp:search:simple_form}

Thanks Brian

#1

BoldMinded (Brian)

The demo site has a search page, have you tried that to see if its working as you expect? http://demo.boldminded.com/search

Also, Publisher 2.7 was released the other day. Try upgrading to it to see if it helps solve the issue.

#2

derek allard

Am working with client to get the 2.7 version … will update once installed. Thanks for the quick reply.

#3

BoldMinded (Brian)

Comment has been marked private.

#4

derek allard

Hi Brian,

The latest version of Publisher did not resolve the issue. I’m going to try a few more things but if you have any suggestions it would be appreciated. Thanks as always for your help.

#5

derek allard

Hi Brian,

In debugging this further, I’ve determined that the following process still allows search results to be displayed:

-Disable Publisher using Utilities -> Debugging -Perform search for “mobile forms” on https://beta.gocanvas.com/content/blog/ -Make note of search [key] in URL, last item -Enable Publisher in Utilities -> Debugging -Refresh page, or open a new tab and navigate to https://beta.gocanvas.com/content/blog/search-results/[key]/ -Search results still render

Thanks!

#6

derek allard

Hi Brian,

The first call in the stack is the following:

SELECT COUNT(*) AS count FROM exp_channel_titles             AS t
                LEFT JOIN exp_channels          AS w  ON t.channel_id = w.channel_id
                LEFT JOIN exp_publisher_titles  AS pt ON pt.entry_id = t.entry_id AND pt.lang_id = 1 AND pt.status = 'open'
                LEFT JOIN exp_publisher_data    AS pd ON pd.entry_id = t.entry_id AND pd.lang_id = 1 AND pd.status = 'open'
                LEFT JOIN exp_members           AS m  ON m.member_id = t.author_id
                LEFT JOIN exp_member_data       AS md ON md.member_id = m.member_id
            WHERE t.entry_id IN (2658,2656)  ORDER BY t.entry_date  desc

This dev site does have two items that have been edited since publisher was installed and those are the two items that show up. I imagine those might have a pt.status = ‘open’ or pd.status = ‘open’ on them.

None of the other entries have been edited or published since the site was set up. Performing a search for “test” at https://beta.gocanvas.com/content/blog will show the two results.

Thanks!

#7

BoldMinded (Brian)

So basically only new entries added after Publisher was installed show up in the search results?

#8

derek allard

Entries that have been edited and published, not necessarily “new” entries. These entries existed before installing publisher.

#9

BoldMinded (Brian)

Take a look at the exp_publisher_titles and publisher_data tables. Are there rows for every entry that exists in exp_channel_titles?

#10

derek allard

Let me check the database and get back to you. Thanks Brian.

#11

derek allard

A quick glance at the tables in the backend of the site shows the following

exp_publisher_titles & exp_publisher_data have 203 rows

exp_channel_titles has 2468 rows.

So there is a discrepancy between the two tables. In a perfect world publisher_titles, publisher_data and channel_titles would have the same number of rows?

#12

BoldMinded (Brian)

Yes, they should be identical if you have 1 language and no drafts. Add a language and then it duplicates, add drafts then it adds more. It sounds like it didn’t install completely or you didn’t complete the 2nd step of the installation. Go to this url in your CP: /cp/addons/settings/publisher/utilities/install-step-two

#13

derek allard

Thanks Brian. 1 language no drafts.

2nd Step of the installation was never prompted in the backend.

Will running the 2nd step overwrite any entries that have already been edited? Or just bring those over that do not exist?

#14

BoldMinded (Brian)

Backup your db first, but no it shouldn’t override existing rows.

#15

derek allard

Navigating to the URL you’ve suggested kicks me out of the backend and redirects me to login. Is there some sort of step I’m missing, or some exact time that the 2nd step of installation needs to occur?

#16

BoldMinded (Brian)

I went to that url directly locally and on the demo site and it didn’t log me out. There is no other way to get to that url other than clicking the link in the notice after the install.

For future versions I’m just going to redirect users to that page after the install instead of relying on displaying an alert notice bar that can go unnoticed.

#17

derek allard

Hi Brian … so it sounds like the path here would be to uninstall publisher and reinstall, correct? Is there any risk to doing this that we should be aware of?

#18

BoldMinded (Brian)

The only risk is you’ll lose translations or drafts that have been created since it was installed.

Does your CP have a session ID in the url? If so keep that there and replace the rest of the url with the one provided above so you go to the right page.

#19

derek allard

Hi Brian … OK, was able to get the step two url to run by holding the session id in the url but it doesn’t seem to have fixed it. So now I’m starting to go to the uninstall / reinstall but noticed that I’m getting the following error if I click on approval settings:

https://www.dropbox.com/s/0djtk5k27owepjv/Screen Shot 2017-11-16 at 2.44.34 PM.png?dl=0

Is this significant?

#20

BoldMinded (Brian)

Can you click show and send the full stack trace?

#21

derek allard

Of course: https://www.dropbox.com/s/ne2smt0049snzft/Screen Shot 2017-11-16 at 3.07.44 PM.png?dl=0

#22

derek allard

Not sure if related but I look at the network tab in dev tools it shows a 500: https://www.dropbox.com/s/qdibqd6618zmce8/Screen Shot 2017-11-16 at 3.06.25 PM.png?dl=0 … could just be caused by the stack above but thought I’d mention.

#23

BoldMinded (Brian)

Comment has been marked private.

#24

derek allard

Thanks Brian, will give this a try and get back to you.

#25

derek allard

Hi Brian,

I replaced publisher with the updated build you provided but the error message persists. Going to try un-installing and the reinstalling. I have added the stack here.

https://www.dropbox.com/s/kdbjyxhk1u2twxc/Screen Shot 2017-11-17 at 12.10.33 PM.png?dl=0

#26

derek allard

The top which got cut off is also the same:

SQLSTATE[HY000]: General error: 1096 No tables used: SELECT *

ee/legacy/database/drivers/mysqli/mysqli_connection.php:122

Stack Trace:

#27

BoldMinded (Brian)

Comment has been marked private.

#28

derek allard

Phew! Page renders now.

Thanks Brian for all your guidance.

You can close this bug.

Login to reply