Error when editing: "Referencing to the file used in the field is not allowed."

ask - July 18, 2009 - 18:57
Project:BitTorrent
Version:6.x-9.2-alpha6
Component:Code
Category:bug report
Priority:normal
Assigned:overall
Status:active
Description

The torrent node editing (preview or saving) gives error

Referencing to the file used in the Torrent file field is not allowed.

where 'Torrent file' is the name of my field of "Torrent" type.

In case of two torrent files, the above error appears twice.

This error is raised by row 424 of filefield/filefield_widget.inc of filefield-6.x-3.1 module:

        if ($references['filefield'] == 0) {
          form_error($element, t('Referencing to the file used in the %field field is not allowed.', array('%field' => $element['#title'])));
        }

This error did not appear with 9.2-alpha3.

Don't know really what to debug.

#1

overall - July 18, 2009 - 20:31

It seems that it's a FileField issue.
#441280: Editing node causes Referencing to the file used in the field is not allowed (and also #466104: Referencing to the file used in the field is not allowed (?))
I'll try to fix it anyway, but I don't promise....

#2

overall - July 19, 2009 - 08:22
Assigned to:Anonymous» overall
Status:active» fixed

#3

overall - July 19, 2009 - 08:22
Status:fixed» active

#4

overall - July 19, 2009 - 09:15

#5

ask - July 19, 2009 - 21:51

Thanks, the patched filefield library works (!) after update to bittorrent-HEAD version from CVS.

Found the bittorrent-HEAD buggy sometimes. Am I right that it's no need to report those bugs before the 6.x-10-dev is published?

Is there any IRC channel for developers of the module?

#6

overall - July 20, 2009 - 21:32

Am I right that it's no need to report those bugs before the 6.x-10-dev is published?

Yes, you are right, also I have to notice that 10.x release will never be published, because of some problems with version numbers:
#502164: Cannot create module branch "DRUPAL-6--10" in CVS
#498130: Correct version numbers

Is there any IRC channel for developers of the module?

Currently I am the only developer of the module. bradfordcp currently busy with other projects ( http://drupal.org/node/440838 ).

#7

ask - July 21, 2009 - 00:13

Ok, I see... But it does not seem to be a problem just to stay in 9.x versions numbering if they wouldn't manage to 'rollback' those versions for you (which is not the case if they really use the native CVS server).

Anyway, thanks for your efforts in moving the project forward. I also plan to join the development process with active contributions to this module later this winter, after changing the job.

#8

System Message - August 4, 2009 - 00:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

quicksketch - October 12, 2009 - 03:16
Status:closed» active

I'm reopening this issue because the patch in #441280: Editing node causes Referencing to the file used in the field is not allowed will not be applied. I think this is a fundamental problem with BitTorrent module, since no other module extending FileField requires this patch.

#10

VitSSS - November 8, 2009 - 12:51

I found problem. Mistake in function bt_torrent_elements()

work code:

/**
* Implementation of hook_elements().
*/
function bt_torrent_elements() {
  $elements = array();

  $filefield_elements = filefield_elements();
  $elements['torrentfield_widget'] = $filefield_elements['filefield_widget'];

  //
  $elements['torrentfield_widget']['#process'][] = 'bt_torrent_widget_process';
  $elements['torrentfield_widget']['#process'] = array('bt_torrent_widget_process');
  $elements['torrentfield_widget']['#value_callback'] = 'bt_torrent_widget_value';
  //
 
  // specify the return structure of the element (experimental, unused in releases).
  //$elements['torrentfield_widget']['#returns'] = array('array' => array('fid' => 'int')); //... //???

  return $elements;
}

 
 

Drupal is a registered trademark of Dries Buytaert.