It's possible to hide messages for anonymous which are generated by aggregator when RSS is updated? Like: 'There is new syndicated content from %site'
I'm using poorsman, because I can't configure cron on the server.

Comments

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

I believe this comment http://drupal.org/node/342128#comment-1203466 can be used for that.

Please post back how that works out for you.

- Arie

kenorb’s picture

Version: 6.9 » 6.x-dev

Yes, but it's not solution for 6.x :)
http://drupal.org/node/291026#comment-952337
http://drupal.org/node/291026#comment-973800

Temporary I've uncommented drupal_set_messages generated by aggregator.

ainigma32’s picture

LOL I missed that was your own post :-D

I guess you mean it's a workaround and not a final solution right?

AFAICT from the comments in #291026: change E_NOTICE to warning and allow selection of error level there are no plans to back port that patch to D6 but I guess you could give it a try.

- Arie

kenorb’s picture

Category: support » feature
Status: Postponed (maintainer needs more info) » Active

But aggregator can be patched in some other ways, like:
- don't show drupal messages when run via cron
- additional option to hide the messages for specified role
- show messages only for users who have permission: 'administer news feeds'
etc.

pieterdc’s picture

Don't like to do it this way, but still: "subscribe".

Temporary I've uncommented drupal_set_messages generated by aggregator, because most of them get logged by watchdog() anyway

kenorb’s picture

You can try workaround:
http://drupal.org/project/drupal_tweaks (Msg tab).
It will filter messages which you choose.

yan’s picture

I'd like to support this feature request. It should be possible to control the messages. I'm using Poormanscron, too, and that way anonymous users trigger the cron run and then get the message.

gaele’s picture

Title: hide aggregator messages to anonymous » Don't show aggregator messages to anonymous users
Version: 6.x-dev » 6.17
Category: feature » bug

I see these messages in one message box, while not logged in:

  • There is new syndicated content from site 1.
  • There is no new syndicated content from site 2.
  • The feed from site 3 seems to be broken, because of error "404 Not Found".

Now:

  1. This is clearly a bug. These messages are aimed at admins, not anonymous users, or even regular users.
  2. Even an admin probably doesn't care whether aggregator encountered new content or not every time cron runs. The messages are logged in the watchdog anyway.
  3. The third message is marked as a warning in the watchdog, but not in the message box.
gaele’s picture

Status: Active » Needs review
StatusFileSize
new4.92 KB

The problem: aggregator_refresh() is called both from cron and from /admin/content/aggregator (a manual refresh). In the latter case you do want messages shown to the screen, in the former you don't.

The patch does this:

  • do not show messages when the refresh is called from cron
  • mark error messages to the screen as "error"

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

gaele’s picture

Status: Needs work » Needs review

#9: aggregator.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

gaele’s picture

Version: 6.17 » 6.19
Status: Needs work » Needs review
StatusFileSize
new4.92 KB

Status: Needs review » Needs work

The last submitted patch, aggregator.371157.patch, failed testing.

rayasa’s picture

Status: Needs work » Needs review
StatusFileSize
new3.51 KB
new3.51 KB

Here's a patch implementing kenorb's 3rd option in #4

With this patch the system messages related to feeds will be shown only to those users who have 'administer news feeds' privileges.

The last submitted patch, aggregator.module.patch, failed testing.

rayasa’s picture

StatusFileSize
new2.15 KB

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

kevinwal’s picture

StatusFileSize
new1.74 KB

Submitting the last patch after rebuilding from current head release.

gaele’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

kevinwal’s picture

StatusFileSize
new1.66 KB
kevinwal’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

pramudya81’s picture

subscribing

I want this feature too. We should be able to control to whom the message displayed.

klonos’s picture

subscribing...

kevinwal’s picture

Status: Needs work » Needs review
StatusFileSize
new1.72 KB

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

gaele’s picture

kevinwal’s picture

Thanks Gaele, I'll take a look. Not sure what I'm doing wrong here. Tried a handful of times.

liam43’s picture

subscribing

jleroi’s picture

subscribing

gaele’s picture

Status: Needs work » Needs review
StatusFileSize
new1.72 KB
filemakers’s picture

Hi
Sorry to slip this in here, i am new to Drupal, "1 month", I am also having this issue on this module, could you tell me what I need to do to install this patch? happy to test Beta's as the alternative is that I remove this functionality until resolved.

klonos’s picture

...go to top of this page -> enter the term 'patches' in the search field and start a search -> in the search results, the 4th or so is one called 'Applying patches' -> visit this link -> read and experiment -> if patch refuses to be applied, go to the end of that article and visit the 'Applying a patch manually' link -> once again read end experiment.

I am sure that after a few tries you'll get it right. Good luck with it ;)

Vayira’s picture

subscribing

kevinwal’s picture

#27: aggregator.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, aggregator.patch, failed testing.

gaele’s picture

Status: Needs work » Reviewed & tested by the community

kevinwal, testbot only tests on D7. So don't let it test again, or the status will be reset again as well.

Setting status to RTBC to allow Gábor to have a look at #33.

kevinwal’s picture

Roger that Gaele,

I was unsure on what the resolution was from the patch you posted without a status?

jleroi’s picture

When trying to test the patch on a Linux box I get 3 out of 3 hunks FAILED.

gaele’s picture

jleroi, which version of Drupal did you use? The patch is for 6.19.

jleroi’s picture

I'm using 6.19. I tried resaving and giving it another go but no joy. I'll keep trying.

gaele’s picture

StatusFileSize
new1.53 KB

Apparently the patch was not for 6.19.
jleroi, try this one.

zcrow’s picture

Still not working. Getting errors

jleroi’s picture

I appreciate the help gaele, but same here. Still getting the hunk failed errors.

gaele’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.38 KB

This applied cleanly on my fresh 6.19 check-out.

Ela’s picture

subscribing

Ela’s picture

Patch in #47 seems to fix most of it, except that error messages still show to an anonymous user.
The line: drupal_set_message(t('The feed from %site seems to be broken, because of error "%error".', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
repeats twice in the aggregator.module, so maybe the patch should apply to both of them?

gaele’s picture

StatusFileSize
new4.91 KB

True. Which brings us back to my original patch from #9 :-)

Ela’s picture

Patch in #50 seems to work just fine! :)

gaele’s picture

Status: Needs review » Reviewed & tested by the community

Seems ready for Gábor.

danny englander’s picture

subscribing, having the same issue.

gábor hojtsy’s picture

Version: 6.19 » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

1. Does this apply to Drupal 7? Looks like this was not discussed. I assume it does.

2. The $admin default seems to be FALSE, which changes default behavior for API functions from how they worked before. I agree it makes them work in more logical ways, but that is not the point. We should keep backwards compatibility.

3. Not sure naming the argument $admin is a good idea. Maybe $messages or something like that? If it just has effect on those as I'm seeing.

klonos’s picture

The argument is named $admin, because it is used when checking if the user is an admin or not. If the check was to display messages or not, then something like $messages would be ok. If $admin seems to 'generic' and there is fear of confusion, then $messages is as generic too. How about $user_is_admin or $role_is_admin? (or something like $show_messages if we want to avoid the word 'admin') ...I mean drupal coding standards do allow underscores in variable names. Right?

gábor hojtsy’s picture

Yes, indeed $show_messages would be consistent with how Drupal handles this elsewhere.

gaele’s picture

StatusFileSize
new4.62 KB

$admin renamed to $show_messages, defaulting to TRUE.

I tried D7 with a bogus feed url, but couldn't get any messages to appear on screen. Didn't look into it any further, though.

Ela’s picture

#58 seems to work! Thank you for the patch.

katherinecory’s picture

I applied #58 and anonymous users still saw the new syndicated content message.

katherinecory’s picture

Any update on this issue? I've tried Drupal tweaks and it still didn't make any difference.

danny englander’s picture

There is a new module called "Disable Messages", I am hoping this might be a work around.
http://drupal.org/project/disable_messages

My clients keep reporting the infamous "There is new syndicated content..." as a bug.

klonos’s picture

Thanx for the info Danny ;)

katherinecory’s picture

Mine too! Thanks for the heads up *goes off to download*

Josephnewyork’s picture

In my opinion this should be controlled via theme's template engine...

Below is what I use and has been very helpful. Just add it anywhere in your theme's template.php file. It even handles the Operating Offf-line mode message which I remove when themeing.

/**
 * Provides message status visibility control for:
 *  @offline_status = FALSE
 *  @new_syndication_status = FALSE
 *  @no_new_syndication_status=FALSE
 * 
 * Pass TRUE for messages to be removed.
 */
function remove_message_statuses($offline_status=FALSE, $new_syndication_status=FALSE, $no_new_syndication_status=FALSE) {
	$removals = array();
	if($offline_status)            $removals[] = l(t('Operating in off-line mode.'), 'admin/settings/site-maintenance');
	if($new_syndication_status)    $removals[] = t('There is new syndicated content from ');
	if($no_new_syndication_status) $removals[] = t('There is no new syndicated content from ');
	if(is_array($_SESSION['messages']['status'])) {
		$statuses = array();
		foreach($_SESSION['messages']['status'] as $status) {
			$save = TRUE;
			foreach($removals as $remove) if(strpos($status, $remove)===0) $save = FALSE;
			if($save) $statuses[] = $status;
		}
		if(!count($statuses))	{
			unset($_SESSION['messages']['status']);
		} else {
			$_SESSION['messages']['status'] = $statuses;
		}
	}
}
global $user;
$admin = $user->uid == 1;
remove_message_statuses(TRUE, !$admin, !$admin);

Only tested in D6

naitmare’s picture

are there any news? tried disable_messages and that code in my template.php and i'm still getting the same annoying message..
Thanks!

tim.plunkett’s picture

Version: 7.x-dev » 8.x-dev
Status: Patch (to be ported) » Needs work
Issue tags: +Needs backport to D6, +Needs backport to D7

This hasn't made it into D8 yet.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kenorb’s picture

Priority: Normal » Minor
Issue summary: View changes

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

catch’s picture

Version: 8.9.x-dev » 9.2.x-dev
Issue tags: +Bug Smash Initiative

This is still valid, at least for some error messages, for example from DefaultFetcher:

 }
    catch (TransferException $e) {
      $this->logger->warning('The feed from %site seems to be broken because of error "%error".', ['%site' => $feed->label(), '%error' => $e->getMessage()]);
      $this->messenger->addWarning(t('The feed from %site seems to be broken because of error "%error".', ['%site' => $feed->label(), '%error' => $e->getMessage()]));
      return FALSE;
    }

Could we just use trigger_error() instead, then showing a warning or not would be based on error display settings. Or just rely on the log messages.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Project: Drupal core » Aggregator
Version: 9.3.x-dev » 1.x-dev
Component: aggregator.module » Code

The aggregator module has been removed from Core in 10.0.x-dev and now lives on as a contrib module. Issues in the Core queue about the aggregator module, like this one, have been moved to the contrib module queue.

larowlan’s picture

Category: Bug report » Task
Issue tags: -Needs backport to D6, -Needs backport to D7 +Needs reroll