164 Posts
redback
10 years ago
Topic

Hello,

i m using the plugin "Free Button", but don't get it worked.

Approach: Make a delete button in site form. Function: Delete current article.

Settings.



Get a VIP membership
4229 Posts
Kadministrator
10 years ago
6
Level 1

Hi,

seems there is a bug with delete and view links, to solve your problem with delete you can try this temporary fix:

add this line to the beginning of onCCK_FieldPrepareForm function in button_free.php

$config['id'] = !isset($config['id']) ? $config['pk'] : $config['id'];
164 Posts
redback
10 years ago
2
Level 2

Hello Klas,

thanks for your answer. Where exactly you mean? I tried it on this position. Thanks for your help.

// onCCK_FieldPrepareForm

// Modi Klas (Seblod) 

$config['id'] = !isset($config['id']) ? $config['pk'] : $config['id'];

public function onCCK_FieldPrepareForm( &$field, $value = '', &$config = array(), $inherit = array(), $return = false )

4229 Posts
Kadministrator
10 years ago
1
Level 3

Hi,

you can place it after this lines

public function onCCK_FieldPrepareForm( &$field, $value = '', &$config = array(), $inherit = array(), $return = false )
{
   if ( self::$type != $field->type ) {
      return;
   }
   self::$path       =  parent::g_getPath( self::$type.'/' );
   $field->label2 =  trim( @$field->label2 );
   parent::g_onCCK_FieldPrepareForm( $field, $config )
22 Posts
denys
8 years ago
0
Level 4

Hi, Klas!

This fix not work in Joomla 3.6.x and Seblod 3.10.x!

How to fixed this bug?

164 Posts
redback
10 years ago
2
Level 2

Hallo Klas,

thanks for you help. The Line has no effect in my case. Just getting a confirmation-message for deleting, but afterwards happen nothing.

4229 Posts
Kadministrator
10 years ago
1
Level 3

Turn confimation off, it seems also some javascript is missing.

164 Posts
redback
10 years ago
0
Level 4

Hello Klas,

thanks for your help.

Approach: Deleting Artikel in the Site-Form.

Solution: Using the Free Button Plugin works. You just need to add the code mentioned above and turn confimation off.

Get a Book for SEBLOD