Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
in user_relationships_type_edit_submit, you have code like this:
function user_relationships_type_edit_submit($form_id, &$form_values) {
if (arg(3) == 'add') {
This effectively makes it impossible to programmatically submit this form because it is designed to only work if submitted from the form's page itself. Since creating relationship types is not an event that will happen often, you can afford to insert the row, check the number of rows affected, and if it is zero, update the row. Alternatively you could delete the row and then insert it, like is done with variable_set: http://api.drupal.org/api/function/variable_set/5
Comments
Comment #1
robertDouglass CreditAttribution: robertDouglass commentedHere as well I haven't looked into the later versions of the API to see if this limitation has been corrected.
Comment #2
sprsquish CreditAttribution: sprsquish commentedfixed on 5x-1.1 and 5x-2.x-dev
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.