modified text ignored

urwen - February 14, 2008 - 10:40
Project:cck_map
Version:5.x-3.3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

trying to edit a preexisting marker, you can submit the changes, and they appear normally. The problem appears when you try to change the description or the tittle. If you submit a new one everyting seems ok, you can see the modified text.

But if you try to edit again, you´ll see that the text saved was THE FIRST ONE, not the previous...

#1

urwen - February 14, 2008 - 11:50
Priority:critical» minor
Status:active» closed

was my own modification, sorry

#2

urwen - February 14, 2008 - 11:56
Priority:minor» critical
Status:closed» active

no, yet present. Sorry for all the changes but i was testing it was not my fault modding the module.

#3

urwen - February 14, 2008 - 15:57
Status:active» closed

ok, i´ve finally found the problem. With internet explorer 6.0 the module is expecting a lot of problems, and with firefox, sometimes seems that the cache likes to play with our nervous :-S.

#4

urwen - February 14, 2008 - 16:18
Status:closed» active

really crazy. It definitively doesn´t saves the updates, as i described this morning. If you try to edit the map and change, for example, a title, it shows the previous version, not the one which is showing on view tab. Crazy?

#5

urwen - February 14, 2008 - 17:33

ok, i promise that i´ve finally find the bug :-D

in cck_map.js we have this on lines :

marker.image = image;
marker.title = title;
marker.description = title;
this.attachMarkerListeners(marker);

the problem is in

marker.description = title;

that must be

marker.description = description;

i was confused because i was cleaning the source with very similar title and descriptions :-S.

I´ve attached my code which also allows to select different image icons. To do this simply modify the line 574:

$icon_files = array("marker.png" => "marcador rojo","dd-start.png" => "inicio","dd-end.png" => "fin","house.png" => "house","hotel.png" => "hotel", "picnic.png" => "picnic", "airport.png" => "airport", "entertain.png" => "diversion", "building.png" => "edificio");

with your own uploaded icons on cck_map/icons directory

Regards

AttachmentSize
cck_map.js_.txt 16.74 KB
cck_map.module_.txt 25.27 KB

#6

urwen - February 14, 2008 - 17:35
Status:active» closed

#7

beeradb - February 14, 2008 - 17:43

Thanks for all your work on getting to the bottom of that. I'll try to create a patch of your work and sync it with the production release as soon as I can.

You mentioned in an earlier post being interested in helping some with the development of the module. I'm definitely looking for any help I can get with module upkeep and feature expansion. There are a lot of things i'd lke to do with this module, and just don't have much time to devote to it currently.

Thanks,
Brad

#8

urwen - February 19, 2008 - 09:26

im very interested in this module for various projects and, in fact, i´ve made some improvements during the last days and i´d like to contribute them to the community. I also have a lot of work but in part of my work we use drupal so we´d like to share the things which we´ve done to the community.

wating for instructions ;-).

#9

selflearner - November 13, 2008 - 04:53

Just a quick question to urwen, do you know if your cck_map.js patch works in enabling the marker description to show. I tried it and it did not in my site, so just wondering. Marker description is something I want to have, and for some reason, it is not showing up at all as brought up in the above discussion, even after I tried to change the line 'marker.description=description. If you have any suggestions, please share them.
Thanks.

#10

urwen - December 2, 2008 - 12:05

it´s really crazy. After expending lot of time i finally decided to use nodemap and location in other webs. Sorry.

#11

darioarg - February 3, 2009 - 15:49

First, my apologize for my english.

I found the error.

In line 63 of cck_map.module

<?php
if ($form_id == '_content_admin_field') {
 
/*  */
   
if ($form['field_type']['#value'] == 'map_location') {
      unset(
$form['widget']['default_value_fieldset']);
      if (!
strlen($form['widget']['description']['#value']))
       
$form['widget']['description']['#value'] = "Click the map to place markers. Once placed, you can drag markers around to change their location, you may also click to edit or remove them.";
    }
  }
?>

In $form['widget']['description']['#value'] it should be $form['widget']['description']['#default_value'].

It is working for me.

 
 

Drupal is a registered trademark of Dries Buytaert.