We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2498 closed Defect (fixed)

River misformats pre-Elgg 1.7 group forum topic and comment posts

Reported by: kevinjardine Owned by:
Priority: normal Milestone: Elgg 1.7.4
Component: Core Version: 1.7
Severity: minor Keywords:
Cc: brettp Difficulty:

Description

A client complained after an upgrade to Elgg 1.7.x that group forum topics and posts were mis-formatted in the river.

This turned out to be caused by an annotation id of 0 in the river table. For *new* content, the river displays an excerpt of the annotation before the friendly time. But for older content, the annotation id is 0 and the annotation is blank. However, the river_content_display div is generated anyway, mysteriously forcing the friendly time to a new line even if it would have fit in the line above.

I have fixed this by changing the code in

views/default/river/forum/create.php

to

if ($contents) {
		$string .= "<div class=\"river_content_display\">";
		$string .= elgg_get_excerpt($contents, 200);
		$string .= "</div>";
	}

In other words, I only generate the div if there is something to display.

Change History (3)

comment:1 Changed 3 years ago by cash

  • Milestone changed from Elgg 1.8 to Elgg 1.7.4

comment:2 Changed 3 years ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:6982]) Fixes #2498 - checking for existence of comment text before displaying

comment:3 Changed 3 years ago by cash

(In [svn:7105]) Refs #2498 - merged [svn:6982] into trunk from 1.7 branch

Note: See TracTickets for help on using tickets.