Skip to content

Conversation

@benjamin-volle
Copy link

Summary

Function \Algolia\AlgoliaSearch\Block\Algolia::getCurrentCategory always return a category (see \Algolia\AlgoliaSearch\Registry\CurrentCategory::get), so we have to check is the returned category has an ID.

Function \Algolia\AlgoliaSearch\Block\Algolia::getCurrentCategory always return a category (see \Algolia\AlgoliaSearch\Registry\CurrentCategory::get), so we have to check is the returned category has an ID.
@cammonro
Copy link
Contributor

Thank you @benjamin-volle for your contribution! We'll be happy to include the fix. Can you please also provide steps to recreate the scenario?

@benjamin-volle
Copy link
Author

We have for example a module named Amasty_Faq, which includes a controller named "category", so the URL is domain.com/knowledge-base/category/something, so all the layout of Algolia is added to this page.

In fact, with any controller named "category" we can reproduce the issue.

@cammonro
Copy link
Contributor

Thank you for that context. That helps!

@damcou damcou changed the base branch from main to fix/MAGE-1453-category-check October 30, 2025 16:44
@damcou damcou changed the base branch from fix/MAGE-1453-category-check to main October 30, 2025 16:46
@damcou damcou changed the base branch from main to fix/MAGE-1453-category-check-block October 30, 2025 16:52
@damcou damcou merged commit 77d9c4e into algolia:fix/MAGE-1453-category-check-block Oct 30, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants