I just upgraded to the latest 7.x-2.x-dev (2013-03-11). Here's the error I get when running update.php

The following updates returned messages

openlayers module

Update #7206
Failed: Exception: Projection EPSG:4326 requested but not supported in openlayers_get_projection_by_identifier() (line 977 of /home/sideoffc/public_html/sites/all/modules/openlayers/openlayers.module).

How to fix this?

CommentFileSizeAuthor
#2 stack_for_watchdog.patch1022 bytesaugustus.kling
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skchan2’s picture

im getting the same error. any quick fix?

augustus.kling’s picture

Status: Active » Fixed
FileSize
1022 bytes

The reason for the failure is that an existing update was not compatible with the current version of the code. You could have updated incrementally (one update after the other and update the code in the same pace) or use a version of the openlayers module that includes commit 08548bc6b6dfda65a6750f117ecc013442afd1be. Speaking less technical, a version older than this comment.

Please test and close.

If any problem persists please provide a stack trace that shows the failed update. To do so apply stack_for_watchdog.patch to Drupal's root and copy the trace from the log entry as accessible from ?q=admin/reports/dblog. This gives information to debug more efficiently.

cesareaugusto’s picture

@augustus.kling: I upgraded to the today dev then ran update.php....... It works like a charme now! Thank you very much!

augustus.kling’s picture

Status: Fixed » Closed (fixed)

Thanks for testing and confirming.

Sheldon Rampton’s picture

Status: Closed (fixed) » Needs work

I'm getting a very similar error message, even after updating to the latest version of OpenLayers (commit a6bd2cd9d994ede2537798f16df5e7f81b69ebdf). My error occurs at openlayer update #7204, not #7206, but it seems so similar to the error noted above that I thought I should reopen this ticket rather than create a new one.

Update #7204
Failed: Exception: Projection EPSG:4326 requested but not supported. in openlayers_get_projection_by_identifier() (line 972 of /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module).

I was able to get past the error message by rewinding my Openlayers module to an older version that whose latest update number was #7205, using:

git checkout 6c0316c61990e2b073e04d7abb0517aed219001a

After running update.php, I went

git checkout 7.x-2.x

and then ran update.php a second time to perform updates #7206-7208.

The following stack trace shows what I was getting before I did the workaround described above to get it working:

Exception: Projection EPSG:4326 requested but not supported. in openlayers_get_projection_by_identifier() (line 972 of /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module). exception 'Exception' with message 'Projection EPSG:4326 requested but not supported.' in /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module:972 Stack trace: #0 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module(952): openlayers_get_projection_by_identifier('EPSG:4326') #1 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module(1028): openlayers_get_projection('EPSG', '4326') #2 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/includes/openlayers.layers.inc(275): openlayers_get_extent('EPSG', '4326') #3 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module(1330): _openlayers_openlayers_layers() #4 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/ctools/includes/export.inc(680): openlayers_openlayers_layers(Array) #5 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/ctools/includes/export.inc(496): _ctools_export_get_defaults('openlayers_laye...', Array) #6 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.module(403): ctools_export_load_object('openlayers_laye...', 'all', Array) #7 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/profiles/apps_catalog/modules/contrib/openlayers/openlayers.install(376): openlayers_layers_load() #8 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/includes/update.inc(963): openlayers_update_7204(Array) #9 [internal function]: update_do_one('openlayers', 7204, Array, Array) #10 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/includes/batch.inc(284): call_user_func_array('update_do_one', Array) #11 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/includes/batch.inc(161): _batch_process() #12 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/includes/batch.inc(80): _batch_do() #13 /Users/sheldonrampton/Sites/worldbank/appcat/our_distro/dev_code/update.php(473): _batch_page() #14 {main}
augustus.kling’s picture

Thanks a lot for this in-depth report and for taking the time to report even though you have been able to work around the issue yourself.
It's very likely that the error you're getting is because I simply forgot a call to openlayers_update_create_projection_table in openlayers_update_7204. I'll recheck and probably fix this sometime tomorrow.

augustus.kling’s picture

Sheldon, please check if 9a0e2c285adc8b1ce53ab36f5e2d3db0e56f2336 fixes your problem.

dpw’s picture

I was getting the same error as Sheldon for openlayer update #7204, and 9a0e2c285adc8b1ce53ab36f5e2d3db0e56f2336 seemed to resolve the problem... the whole update completed without throwing an exception. I was updating my instance to the latest dev of Cartaro (March 15) when I encountered this error.

Sheldon Rampton’s picture

Augustus, I can't check to see if 9a0e2c285adc8b1ce53ab36f5e2d3db0e56f2336 fixes my problem because my problem was already resolved with the workaround that I resolved previously, and I don't have a copy of the website in the exact previous state that I would need to test from. However, it sounds like dpw has confirmed that your fix worked.

facine’s picture

This patch works for me: http://drupal.org/node/1943968#comment-7182212

Regards

augustus.kling’s picture

Sheldon & dpw, thanks for the information. Let's assume your problem is fixed because neither you nor I can reproduce it any more.

facine, please refer to the comments of Pol and me in http://drupal.org/node/1943968 for our reasons not to include the patch. Whilst it may help instantly we fear it incurs unnecessary maintenance in the long run.