This task is to update the cck_map module at http://drupal.org/project/cck_map from Drupal 5 to Drupal 6. The cck_map module allows individuals to place and edit single or multiple Google Maps markers by clicking a map interface.

Each new major release of Drupal, we introduce new API features and changes that can cause old modules to stop functioning. Modules need to be upgraded with each new version of Drupal so that they are compatible.

To complete this task, work with the module maintainer to port the code to the Drupal 6 API. You'll need to download the latest version of the Content Creation Kit (CCK) for Drupal 6 to reference changes to the CCK field API.

The final deliverable will be a patch against the HEAD version of the module posted to the module's issue queue that has been reviewed and marked "Ready to be Committed". See the resources section for more information.

Primary Contact:
Brad "beeradb" Bowman

Comments

beeradb’s picture

Title: Port cck_map to Drupal 6 » GHOP #151: Port cck_map module to Drupal 6
aclight’s picture

The official task associated with this issue can be found at:
http://code.google.com/p/google-highly-open-participation-drupal/issues/...

fwalch’s picture

Status: Active » Needs work
StatusFileSize
new44.34 KB

This is my current status: you can create and edit a node with a cck_map field. I didn't compare it to the 5.x-version yet, but it seems to work correctly. There are many php notices by content module, and the map isn't displayed on node view. I'll try to finish this as soon as possible.

fwalch’s picture

StatusFileSize
new45.2 KB

I added the ''multiple values' and 'callbacks' keys to cck_map_widget_info(), so some of the php notices disappeared. Also implemented hook_content_is_empty().
However, the most important thing - displaying the map - still doesn't work. The missing $op = 'view' in hook_field() is giving me troubles. I don't really know how I can display the field content now. I played around with hook_field_formatter(), but there I only get a single item and not the full items array like in hook_field(). Any help is appreciated. :)

webchick’s picture

Status: Needs work » Needs review

Marking needs review, even though it's needs work, in order to get some eyes on the student's question.

beeradb’s picture

Apparently this patch http://drupal.org/node/213279 solves the issue:

* Allow formatters to handle multiple values
- new 'multiple values' key in hook_field_formatter_info, is either CONTENT_HANDLE_MODULE or CONTENT_HANDLE_CORE (similar to what we now have for widgets)
- content_format() has to be fed with an "$items" array ($node->field_foo) when used with a 'multiple-values' formatter,
and with an $item array ($node->field_foo[n]) when used with a 'single' (regular) formatter

I think the thing to do is to work towards making it output correctly with that patch applied.

fwalch’s picture

StatusFileSize
new47.31 KB

Thanks for posting a link to that patch, beeradb.. finally, there's output! There is no map, but at least the Google logo is displayed. I noticed that there's the same problem in the 5.x-version (on the node edit page, the map is displayed; the map isn't displayed on the node view page). I will have a look at that later.

Edit: Oh, forgot something: there are two theme_cck_map() functions, one in cck_map.inc and one in cck_map.theme. Are these both necessary?

fwalch’s picture

StatusFileSize
new48.01 KB

I spent the whole afternoon debugging and trying to get this working, but in the end, it actually is worse than before. Now, if I create a marker on the node edit page, all values are replaced by NULL somewhere, so nothing is inserted in the database. Same on preview. And I just don't have any idea of what's happening. Nevertheless, I attached the new patch.
I don't think that it's possible for me to finish this before GHOP ends. However, I will continue to work on the port until it operates correctly.

groovypower’s picture

I just installed with cck_map_3.patch and will be trying it out. However, I was wondering if further progress had been made before I get to far.

chadd’s picture

subscribe

zmove’s picture

Hi,

Is there some news about the porting of CCK map for Drupal 6 ?

thanks

zmove

darrenmothersele’s picture

subscribe

bastos’s picture

subscribe

chasz’s picture

+1 any progess?

pieterbezuijen’s picture

StatusFileSize
new38.32 KB

I made some progress. Sadly, I don't know how to make patches at the moment (will have to look at it later), so you'll get the whole folder. Code needs cleaning and some comments.
But I have a working Google Map on edit and view. Settings page does not work that good, the settings return to default on every view, so every time you want to change a setting, you'll have to set them all again.

Muskwa’s picture

Issue tags: +GHOP

Any news on that issue. Does everything work well? Could the settings page issue be resolved?

Thanks!

chales’s picture

subscribe

pieterbezuijen’s picture

I'm sorry, my knowledge and available time stopped at where it was when I gave the files. Too much work on other projects, so I won't be able to fix this at the moment.

momper’s picture

subscribe

beeradb’s picture

I have very little interest in porting this module myself, I'm being pulled in too many other directions right now (and for the foreseeable future) to port a module I basically don't use on my own sites. I would be more than willing to commit a patch which finishes up this port though. Or better yet, hand off maintenance of this module to someone else who more actively uses it and can show their ability to do a better job than I at maintaining it (not a difficult task :( ).