Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Logout module prevents rebuilding the index of protected pages #8253

Closed
stefansl opened this issue Mar 5, 2016 · 14 comments
Closed

Logout module prevents rebuilding the index of protected pages #8253

stefansl opened this issue Mar 5, 2016 · 14 comments

Comments

@stefansl
Copy link

stefansl commented Mar 5, 2016

If Contao rebuilds the search index and a logout module is somewhere included, the frontend member will be logged out automatically while indexing.
Maybe we should add a session before rebuilding the index, e.g. $_SESSION['REBUILD_INDEX_ACTIVE'] = true;

In the ModuleLogout.php we could return, if the session is set.

I don't have a clue, where to unset the session, but maybe someone here?

@fritzmg
Copy link
Contributor

fritzmg commented Mar 6, 2016

👍 this brought me some trouble already as well

@leofeyer
Copy link
Member

leofeyer commented Mar 6, 2016

The question is rather why you want a logout page to be indexed?

@fritzmg
Copy link
Contributor

fritzmg commented Mar 6, 2016

Well no one wants that, but if you don't think of excluding the logout page from indexing yourself, it might take you a long time to figure out what's going wrong

@stefansl
Copy link
Author

stefansl commented Mar 6, 2016

That's the point. No one wants to index the logout page or module. But even in the official contao demo there would be a problem while indexing protected pages, because "Do not search" is not activated in the page "Logout". See http://demo.contao.org/contao/main.php?do=page&act=edit&id=44

@leofeyer
Copy link
Member

leofeyer commented Mar 7, 2016

Yes, but that is a configuration error IMHO.

@contao/developers /cc

@fritzmg
Copy link
Contributor

fritzmg commented Mar 7, 2016

It will probably be irrelevant with Contao 4.2.0 or 5 when the new Logout page type is introduced (I am assuming such a page type is excluded from indexing anyway then) (contao/core-bundle#236).

@stefansl
Copy link
Author

stefansl commented Mar 7, 2016

Yes, it's definitly a configuration error. But maybe a lot of people run into this one. As @fritzmg said, it could be irrelevant according to #236

@aschempp
Copy link
Member

aschempp commented Mar 7, 2016

I agree it's a configuration problem. The only useful thing I can imagine is a blue hint in the module, similar as we do for the j_mediaplayer template.

@fenepedia
Copy link

I also ran in this problem a few days ago and it took my very long to find the problem.
+1 to a blue hint

@stefansl
Copy link
Author

stefansl commented Mar 7, 2016

It's a very special case, so a hint is IMHO too much. Protecting the logout module from indexing would be more comfortable.

@aschempp
Copy link
Member

aschempp commented Mar 7, 2016

That’s true. The logout module could automatically disable indexing of it’s contained page.

@leofeyer leofeyer added the defect label Mar 8, 2016
@leofeyer leofeyer added this to the 3.5.9 milestone Mar 8, 2016
@leofeyer
Copy link
Member

No, that does not work. If the page is not correctly configured, it will be included by findSearchablePages() and then called when the search index is rebuilt.

@leofeyer leofeyer removed the defect label Mar 16, 2016
@leofeyer leofeyer removed this from the 3.5.9 milestone Mar 16, 2016
@stefansl
Copy link
Author

I guess, we can close this. Implementing #8255 gives enough hints to users, when indexing fails.

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

No branches or pull requests

5 participants