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

Tag cloud doesn't list per store tags #56

Closed
marcatos opened this issue Jan 12, 2017 · 1 comment
Closed

Tag cloud doesn't list per store tags #56

marcatos opened this issue Jan 12, 2017 · 1 comment

Comments

@marcatos
Copy link
Contributor

Method getTags on Block/Sidebar/TagClaud.php has an error in one of the join conditions.

Resulting query is in my case is:

SELECT
  `main_table`.*,
  count(main_table.tag_id) AS `count`
FROM `magefan_blog_tag` AS `main_table`
  LEFT JOIN `magefan_blog_post_tag` AS `pt` ON main_table.tag_id = pt.tag_id
  LEFT JOIN `magefan_blog_post` AS `p` ON p.post_id = pt.post_id
  LEFT JOIN `magefan_blog_post_store` AS `ps` ON p.post_id = pt.post_id
WHERE (ps.store_id IN (0, 2))
GROUP BY `main_table`.`tag_id`

but it should rather be (ON p.post_id = ps.post_id)

SELECT
  `main_table`.*,
  count(main_table.tag_id) AS `count`
FROM `magefan_blog_tag` AS `main_table`
  LEFT JOIN `magefan_blog_post_tag` AS `pt` ON main_table.tag_id = pt.tag_id
  LEFT JOIN `magefan_blog_post` AS `p` ON p.post_id = pt.post_id
  LEFT JOIN `magefan_blog_post_store` AS `ps` ON p.post_id = ps.post_id
WHERE (ps.store_id IN (0, 2))
GROUP BY `main_table`.`tag_id`
marcatos added a commit to Hevelop/module-blog that referenced this issue Jan 12, 2017
magefan added a commit that referenced this issue Jan 15, 2017
@magefan
Copy link
Owner

magefan commented Jan 15, 2017

Thank you for your report and solution for Magento 2 Blog.

@magefan magefan closed this as completed Jan 15, 2017
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

2 participants