Jump to content

[BUG 4.7.0] Cannot setup extra fields in Downloads to be included in topics

Go to solution Solved by Marc Stridgen,

Recommended Posts

When adding a new extra field in Downloads the option Include field in topics? is never saved correct. Enabling it will always show it as disabled when you go edit it again.

The issue is caused by the code in \applications\downloads\sources\Field\Field.php on lines 152-157:

		if ( \IPS\Application::appIsEnabled( 'forums' ) AND isset( $values['cf_topic'] ) )
			/* Forcibly disable include in topic option if it is a paid field */
			$values['topic'] = ( isset( $values['downloads_field_paid'] ) AND $values['downloads_field_paid'] ) ? $values['cf_topic'] : 0;
			unset( $values['cf_topic'] );

The code checks if the paid field option is active and disables the include in topic option. The problem is that the code above does the opposite and always disables the include in topics option when the paid file is NOT required.

I swapped the values to fix it:

$values['topic'] = ( isset( $values['downloads_field_paid'] ) AND $values['downloads_field_paid'] ) ? 0 : $values['cf_topic'];


Another bug related to this setting is that when the topic is updated the pre-edit value is used. For the edited value to show up in the support topic you have to re-edit again the file and then it properly shows up in the topic content.

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...
  • Solution

Just a quick update to let you know that this issue was resolved in the recent 4.7.8 release of our platform. Please upgrade your site to resolve this issue. If you are still seeing any issues after upgrading to this version, please let us know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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