Deprecate FinderIndexerHelper::getContentPath()#20934
Merged
mbabker merged 1 commit intojoomla:3.9-devfrom Jun 29, 2018
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a PR to enable #20571.
FinderIndexerHelper::getContentPath() is supposed to create the SEFed URL of the content item while indexing the content item. However, that doesn't really work for several reasons. First of all, there are component routers out there, that fail in the wrong circumstances, like being run in the backend. Then there are the issues of permissions. The user running the indexer (either by batch indexing in the backend or by saving a content item) in general has other permissions than a guest user and thus might see menu items that the guest user does not see. Last but not least, Smart Search does not really know anything about the routing system and thus also does not know when to update that data, thus we already have the wrong data in the DB when a user creates an article and then links it via a menu item.
Long story short: We have to create the right route on runtime and thus can't pre-compute this. That is why we haven't used the data from that in com_finder ever. Which is why this method is being deprecated here.