Can not save the access restricted gmapfield

Sweetchack - November 2, 2009 - 14:50
Project:GMap Field
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If the edit rights of gmapfield is access restricted by hook_field_access(), then the validate callback always set this error: "Please enter a valid GMap macro."
The field is not required.
Maybe the solution is (line 736):

<?php
function _gmapfield_validate(&$item, $delta, $field, $node) {
 
// Check for valid GMap Macro
 
if (!gmapfield_content_is_empty($item, $field) AND !_gmapfield_validate_macro($item['gmap_macro'])) {
   
form_set_error($field['field_name'] .']['. $delta. '][title', t('Please enter a valid GMap macro.'));
  }
  return
TRUE;
}
?>

#1

zzolo - November 22, 2009 - 17:54

I am not able to reproduce this. Try new code that I am about to commit.

 
 

Drupal is a registered trademark of Dries Buytaert.