Download & Extend

Can not save the access restricted gmapfield

Project:GMap Field
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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;
}
?>

Comments

#1

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

nobody click here