Hi everybody,
updating a value contained in a Location field, putting a '0' (zero) at it's beginning, ends with the zero not saved.
How to reproduce it:

  1. create a new node with a Location Field inside
  2. in the Location field (i used Location Phone Field) insert a value like '1234567'. It'll be saved correctly as '1234567'.
  3. edit the node again and insert '01234567' in the same field of before. It will be saved as '1234567'

I attached a patch to fix this bug, but it needs reviews.
Greetings
Alberto

Files: 

Comments

kongoji’s picture

StatusFileSize
new434 bytes

sorry, I switched the files before, so this is the correct patch.

websenso_com’s picture

+1 . Need to be fixed. 10% of French postcode start by zero. In addition, when you edit a location previously saved with a postcode 01234, then lat/long geocode is recalculated with "1234" which another geographic area. ==> Bug !

dandaman’s picture

Status:Needs review» Reviewed & tested by the community

This code does help on my 7.x-3.x-dev version as well. It is also helpful.

John Carbone’s picture

+1. Applied patch, now works as expected. Thanks kongoji!

math-hew’s picture

Applied patch, it fixed this issue for me. Thanks!

ankur’s picture

Priority:Major» Normal
Status:Reviewed & tested by the community» Closed (fixed)

Committed to 6.x-3.x/7.x-3.x/7.x-4.x.

Thanks to kongoji for the patch and thanks to all that tried and verified it.