Jump to content

In Blogs -> User tags User -> no Notification


AnNo1935

Recommended Posts

Hello,

It's a funny because I get 2 notifications when someone mention me in the entry.

IPS 4.2.4 fresh installation

I made quick test and this also happened with downloads files

mention.thumb.jpg.449486deb098e716598dcc7cf494d646.jpg


Mentions doesn't work in the Gallery when upload new images. I can mention the user but he don't receive notification

mention2.jpg.f5611da51e9dfe36a5b8cf88744eaee4.jpg


Entries and files

\applications\blog\sources\Entry\Entry::processForm() and \applications\downloads\sources\File\File::processForm()

Both use similar code

	public function processForm( $values )
	{
		parent::processForm( $values );
		
		if ( !$this->_new )
		{
			$oldContent = $this->content;
		}
		$this->content	= $values['blog_entry_content'];
		if ( !$this->_new )
		{
			$this->sendAfterEditNotifications( $oldContent );
		}
	public function processForm( $values )
	{
		parent::processForm( $values );
		$new = FALSE;

		if ( $this->_new )
		{
			$new = TRUE;
		}
		else
		{
			$oldContent = $this->desc;
		}
		$this->desc	= $values['file_desc'];
		if ( !$this->_new )
		{
			$this->sendAfterEditNotifications( $oldContent );
		}

When you call parent::processForm( $values ); the value of $this->_new that you use bellow is false (if you can use tags)

		if ( $this instanceof \IPS\Content\Tags and static::canTag( NULL, $this->containerWrapper() ) and isset( $values[ static::$formLangPrefix . 'tags' ] ) )
		{
			$idColumn = static::$databaseColumnId;
			if ( !$this->$idColumn )
			{
				$this->save();
			}

So the system send duplicate notifications

Tags disabled

mention4.thumb.jpg.cfb3df94fb35a30ca7294f14be151813.jpg

1 notification

mention3.jpg.d9d6d5d165ccaf842e734d9906c3fcb6.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...