Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sulu CMS 1.6 Search indexes “page_example_published” not known. error (1.5 works) #93

Closed
mykbas opened this issue Apr 6, 2018 · 11 comments

Comments

@mykbas
Copy link

mykbas commented Apr 6, 2018

Hello, I've faced strange behavior of sulu-minimal project, I am installing sulu-minimal 1.5 - indexing of massive_page_example_published-en-i18n and search field on client homepage works as expected, sulu-minimal 1.6 gives an error Search indexes "page_example_published" not known. Known indexes: "page", "contact" and only massive_contact and massive_page-en-i18n indexes are created.

P.S. tried purging and rebuilding indexing with no errors, cleared cache, installed barebone repo from scratch both locally (PHP7.2) and on docker containers (PHP7.1)... now I just got stuck

Example projects I have also tested:

@mykbas
Copy link
Author

mykbas commented Apr 6, 2018

do not know why but after some time publishing posts on 1.6 project the index for 'page_example_published' appeared, but I think the default to see zero found as in v.1.5 would be better for newly created applications.

@mykbas mykbas closed this as completed Apr 6, 2018
@mykbas mykbas reopened this Apr 6, 2018
@mykbas
Copy link
Author

mykbas commented Apr 6, 2018

and bin/console massive:search:index:rebuild doesn't create page_example_published however there are published pages in database, this index folder is somehow created on publishing new data...

@alexander-schranz
Copy link
Member

alexander-schranz commented Apr 6, 2018

@mykbas bin/console (bin/adminconsole) will only create indexes of the admin for the website you need call bin/websiteconsole

@mykbas
Copy link
Author

mykbas commented Apr 7, 2018

@alexander-schranz I've just tried removing indexes folders and running with bin/websiteconsole massive:search:index:rebuild on barebone sulu-minimal v1.6 - only massive_contact and massive_page-en-i18n created and same error Search indexes "page_example_published" not known. for search on homepage.

@alexander-schranz
Copy link
Member

@mykbas I'm not able to reproduce it. Can you check it for a new project by running the following commands:

composer create-project sulu/sulu-minimal my-project
cd new-project
bin/adminconsole sulu:build dev

# now you should see a list of indexes
ls var/indexes/ 

bin/adminconsole massive:search:purge --all --force
# now no indexes should be listed
ls var/indexes/ 

bin/adminconsole massive:search:reindex
# now the following indexes should be listed
#  - massive_category-en-i18n               
#  - massive_page_example-en-i18n
#  - massive_contact
#  - massive_media-en-i18n           
#  - massive_snippet-en-i18n
#  - massive_page-en-i18n
ls var/indexes/ 

bin/websiteconsole massive:search:reindex
# now also the published index is listed there:
#  - massive_page_example_published-en-i18n
ls var/indexes/ 

@mykbas
Copy link
Author

mykbas commented Apr 9, 2018

@alexander-schranz for comparison I just tried on the same environment PHP7.0 v1.6 and 1.5 (previously tried also v1.3 - indexes worked as in 1.5) with output below:

Sulu CMS 1.6

composer create-project sulu/sulu-minimal project
cd project
# var/indexes - nothing there

bin/adminconsole sulu:build dev

# now you should see a list of indexes
ls var/indexes/ 
# - massive_contact
# - massive_page-en-i18n

bin/adminconsole massive:search:purge --all --force
# now no indexes should be listed
ls var/indexes/ 
# var/indexes - nothing there

bin/adminconsole massive:search:reindex
ls var/indexes/ 
# - massive_contact
# - massive_page-en-i18n

bin/websiteconsole massive:search:reindex
ls var/indexes/
# - massive_contact
# - massive_page-en-i18n

Sulu CMS 1.5

composer create-project sulu/sulu-minimal project 1.5
cd project
# var/indexes - nothing there

bin/adminconsole sulu:build dev

# now you should see a list of indexes
ls var/indexes/ 
# - massive_contact
# - massive_page_example-en-i18n
# - massive_page_example_published-en-i18n

bin/adminconsole massive:search:purge --all --force
# now no indexes should be listed
ls var/indexes/ 
# var/indexes - nothing there

bin/adminconsole massive:search:reindex
ls var/indexes/ 
# - massive_contact
# - massive_page_example-en-i18n

bin/websiteconsole massive:search:reindex
ls var/indexes/
# - massive_contact
# - massive_page_example-en-i18n
# - massive_page_example_published-en-i18n

@alexander-schranz
Copy link
Member

@mykbas does this only happens when you have no pages? or when you create a new page in the tree and purge and reindex the published does also exist in 1.6?

@mykbas
Copy link
Author

mykbas commented Apr 9, 2018

@alexander-schranz it happens with no pages. When I create new page via admin panel published index folder appears, but after purging and reindexing (also with bin/websiteconsole) published is missing again for v1.6. Next time index is created after continuing adding new pages via admin panel.

@alexander-schranz
Copy link
Member

@mykbas how did you purge and reindex? What is the output of reindexing command.

@mykbas
Copy link
Author

mykbas commented Apr 9, 2018

@alexander-schranz Thanks for your patience and pointing out the right direction. Probably I messed smth up with consoles or maybe there were leftovers in docker containers, I was reproducing the whole workflow from scratch and it seems to be working now:

  1. Creating a new project sulu/sulu-minimal (1.6.16)
composer create-project sulu/sulu-minimal project
cd project
bin/adminconsole sulu:build dev
ls var/indexes/
# - massive_contact 
# - massive_page-en-i18n
  1. Add a new simple page via content in admin panel.
ls var/indexes/
# - massive_contact  
# - massive_page-en-i18n  
# - massive_page_example-en-i18n  
# - massive_page_example_published-en-i18n
  1. Purge, reindex and check:
bin/adminconsole massive:search:purge --all --force
ls var/indexes/
# empty

bin/adminconsole massive:search:reindex
ls var/indexes/
# - massive_contact  
# - massive_page-en-i18n  
# - massive_page_example-en-i18n  
bin/websiteconsole massive:search:reindex
ls var/indexes/
# - massive_contact  
# - massive_page-en-i18n  
# - massive_page_example-en-i18n  
# - massive_page_example_published-en-i18n

@mykbas mykbas closed this as completed Apr 9, 2018
@mareksuscak
Copy link

This is definitely not fixed. Just set up a new sulu instance through sulu-docker and encountered the same problem., the steps above did not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants