Jump to content

Hardcoded column name in Colorize nodes


Adriano Faria

Recommended Posts

I'm trying to use the Colorize Node feature in my apps but I'm getting on streams:

Quote

SELECT `rc_id`, `rc_name_furl`, `feature_color` FROM `raffles_categories` WHERE ( rc_id IN(1) )
IPS\Db\Exception: Unknown column 'feature_color' in 'field list' (1054)

That's because you hardcoded the column name in IPS\Node\Colorize to be used in FORUMS app only.

/**
 * Colorize Trait
 */
trait Colorize
{
	/**
	 * @brief	Table column name that holds the feature color hex
	 */
	public static $featureColumnName = 'feature_color';

If I rename my column to remove the table prefix, then it works:

ZsK96UE.png

But that's not right. It should've been done like reaction, where you pass the ID.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 1 month later...
  • 2 weeks later...

Archived

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

  • Recently Browsing   0 members

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