I activated and later deactivated some content types on the list of 'Allowed content types'. Effect for normal/ authenticated user: In the section 'add posts', the deactivated content types disappeared from the list of available content types. Fine. But in the section 'Add Popular Content', the old/ initial content types are still shown and are selectable. I guess, this must be a bug...? Thanks.

Drupal version: 5.1
MySQL: 5.0.19
PHP: 5.1.6

Comments

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

It is a potentially a bug in popular.inc. But those should disappear the next time your CRON runs, since MySite's cron function should clear out deactivated content from user pages.

Can you run cron.php and see if the problem goes away?

olio’s picture

StatusFileSize
new337.26 KB

Thanks for your quick reply!
I tried cron but unfortunately nothing changed: In the attached screenshot (page 1), I disabled "Forum topics" before I ran cron. On the screenshot on page 2 you can see that "Forum topic posts" still shows up in the list of available options.
In the same time, I realized another curious phenomen that may be related to the described problem: Since yesterday I tried a lot of configurations and settings, both as admin and as normal authorized user. Now, when I compare the list of "Most popular content", I see totally different entries. (see screenshots on page 2 and 3 of attached pdf)
Could it be that the shown items don't show the overall popularity of all "mysites" but only of the actual one ? I don't know if this makes sense but anyway: I also made screenshots of the mysite database Just in case...

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Couple of notes, looking at the (very helpful) PDF.

1) Page one doesn't make any sense to me, because it doesn't follow the UI of the 5.x.2 release. (See attachment)

2) Popular content lists (like all content lists) omit items that are already in a user's collection -- that would explain why the set changes for each user. That happens inside the mysite_get_content_element() function. http://therickards.com/api/function/mysite_get_content_element/MySite

3) The "Forum topic posts" content element is coming from the Node include, not the Forum include. Check your configuration of settings under the "node" submenu tab. This is not technically a bug, it is a configuration error.

I asked you to run cron because doing so activates mysite_type_hook_clear() http://therickards.com/api/function/mysite_type_hook_clear/MySite. This hook removes deactivated content from all user collections. When run, it will cause the popular.inc to recalculate the top 100.

agentrickard’s picture

StatusFileSize
new58.07 KB

Forgot the screenshot

olio’s picture

StatusFileSize
new51.95 KB

Hi,
sorry for the delay and thank you for the explanation. O.k., I tried to figure out what I have to change in my configuration but must admit, I only understood the half of what you told me to do ... (I'm far away from being a Drupal expert...)

1) Page one doesn't make any sense to me, because it doesn't follow the UI of the 5.x.2 release. (See attachment)

The 'mysite.info' tells me: "Information added by drupal.org packaging script on 2007-06-25, version = "5.x-2.2", project = "mysite", datestamp = "1182812707"".
My Screenshot shows the page that I get under "admin/settings/mysite/type/node". The screenshot you sent me can be found in my installation under the path: "admin/settings/mysite".

2) Popular content lists (like all content lists) omit items that are already in a user's collection -- that would explain why the set changes for each user. That happens inside the mysite_get_content_element() function. http://therickards.com/api/function/mysite_get_content_element/MySite

O.k., that makes sense.

3) The "Forum topic posts" content element is coming from the Node include, not the Forum include. Check your configuration of settings under the "node" submenu tab. This is not technically a bug, it is a configuration error.

Here I'm a little unsure what to do. That's what I tried: I activated 'Forum topics' under "admin/settings/mysite/type/node". Then I ran cron and looked at the list of "list of the 100 most popular items on personal user pages" under the path "mysite/admin/content/popular. Only "New Groups" was shown there. Then I checked "mysite/1" if a content block 'Forum topics' has been acitvated, but it wasn't. (see attached screenshot) Now I went to "mysite/1/content/popular": the list of popular content comprises only the entry "Who's new".

I'm convinced it's rather my problem of misunderstanding the configuration concept than a problem of the mysite module or a bug. I will try your module on a clean and fresh drupal installation to understand the concept when I have more time.
Anyway, thank you very much for your time and assistance!

agentrickard’s picture

Assigned: Unassigned » agentrickard
Status: Closed (works as designed) » Fixed

I get it. I think the issue is that I'm too familiar with the module and you aren't. So we're talking near each other.

point by point.

1) I obviously misread your first screenshot. Now i get it. You deactivated "Form posts" as an allowed Node type, but it still shows up as a "popular content" option.

2) We're good on this point. The design says "don't let a user select something already in their collection."

3) I think we're still missing each other here. The 'Popular content" plugin looks at the {mysite_data} table and tabulates the entries by 'type' and 'type_id'. There are a few things going on here, including a bug.

The "popular content" query is expensive, so the data is stored in cache and refreshed every 8 hours. But there was a bug in that code. (Now fixed.) I also wipe that cache on cron (now).

Popular content calculates popularity based on the items that have been added -- in effect -- to other people's collections. If you only have one test user, nothing will show up as "popular" for that user. The assumption has been that this is a plugin that you would activate after your users have been adding content for a while, maybe a month or so.

Let me trying annotating what you said you did, to see if that clears anything up.

a) I activated 'Forum topics' under "admin/settings/mysite/type/node".

Right, this lets users add "forum topics" by going to mysite/UID/content/node (see attached).

b) Then I ran cron

This will clear any deactivated plugins from {mysite_data} -- which would effectively recalculate the popularity index.

c) and looked at the list of "list of the 100 most popular items on personal user pages" under the path "mysite/admin/content/popular. Only "New Groups" was shown there.

Shown to whom? If the other options already exist in the user's collection, they won't be shown as options. This may be a design flaw (but I don't think so).

d) Then I checked "mysite/1" if a content block 'Forum topics' has been acitvated, but it wasn't. (see attached screenshot)

It won't be activated until you add it to user 1's collection at mysite/1/content/node

e) Now I went to "mysite/1/content/popular": the list of popular content comprises only the entry "Who's new".

This is probably due to the cache. But I'd need to see the current contents of {mysite_data} to be sure.

I'm going to fix the cache error and roll a 5.x.2.3.

agentrickard’s picture

Status: Fixed » Closed (fixed)

Should be fixed in 5.x.2.3

olio’s picture

It took a long time, but now I got it!!! I must have been blind, dumb, slow of the mark...: It's not the overall popular content of the whole site that a user can add with "add popular content", but the items (droplets, individual forum topics, ...) other users have added to/ plugged in their personal mysite. I read the help text several times but didn't catch the (obvious) meaning. I'm sorry.

I tested my installation with 3 users and it worked fine: I added the same items on the personal page of two users, ran cron and then checked what's on the list of popular items on the personal page of a third user.

Shame on me. But at least, I'm glad that you found a real bug while trying to solve my problem of understanding.
Thank you for your patience. :o)

agentrickard’s picture

Not a problem. It was a good, clear bug report (with screen shots!). I wrote the popular.inc in about 20 minutes and it had not been tested thoroughly, so this was a good test.