#6274 closed defect (bug) (fixed)
#5669 stops blog post activity being recorded on site where search engines are discouraged
Reported by: | rogercoathup | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | |
Cc: | roger@… |
Description
This is a follow-up to #5669.
These amends have stopped activity items for blog posts from working in multisite installation where the WordPress option "Discourage search engines from indexing this site" is enabled.
In 2.1 with the bp_blogs_record_post approach, we could get activity items generated for these sites (where search engines are discouraged) by filtering bp_is_blog_public() to always return true.
This no longer works in 2.2. -- as the new_blog_post activity type isn't registered initially when search engines are discouraged.
What do you suggest is the best approach to keep activity recording, but also keep the sites hidden from search engines? Is there an alternative function we can filter on to ensure the new_blog_post activity type is registered / generated?
---
p.s.: Not recording activity items if a blog is hidden from search engines, does not seem like a good generic solution -- it satisfies one use case (blog farms with independent users), but fails to satisfy other equally valid use cases. For example, in this case, the client (a multinational) has a network of sites for their employees -- the sites are private (so no search engine indexing), but an activity steam recording blog posts is required.
Change History (5)
#2
@
10 years ago
- Milestone changed from Awaiting Review to 2.2.2
Thanks for the report, rogercoathup. What you've described is definitely a regression.
I suggest amending line 84 in bp-blogs-loader.php as the quickest fix
Yes, this looks right to me. We should try to mirror the previous config exactly. imath, could you review this please?
It would be nice to see an approach in the future though that didn't equate search engine visibility with activity tracking.
Yes, I agree wholeheartedly. Related: #3857.
#3
@
10 years ago
Strict checking zero here seems like a mistake. _is_
functions insinuate returning a bool
value.
I'm fine fixing this like this in 2.2.2, and think we should introduce a bp_is_blog_public()
function that returns a proper bool
value instead for 2.3, and adjust our comparisons accordingly.
I suggest amending line 84 in bp-blogs-loader.php as the quickest fix:
from:
to:
This is the same code as used in bp-blogs-filters.php line 114, and bp-blogs-functions.php line 594. So, is a consistent solution.
note:
It would be nice to see an approach in the future though that didn't equate search engine visibility with activity tracking.