Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Originally reported by @blackundertone on Github:
Originally reported by @blackundertone on Github:
Comments
Comment #2
m.stentaThe issue is the AJAX request that happens in farm_area.openlayers.popup.js:
Drupal.settings.basePath
does not automatically includeindex.php?q=
when clean URLs are turned off.The choice seems to be:
* Include some Javascript that will try to detect whether or not clean URLs are enabled, and adjust the URL accordingly. For an example of this, here is an issue in the Views module that fixed something similar: #1359798: Clean urls off break all Ajax views
* Somewhere in the farm_area module's PHP, use
drupal_add_js()
to detect whether or not clean URLs are enabled, and push a Javascript setting with the appropriate base url that can be used in the JS code above.Neither feels particularly "clean" to me (pun intended). I really wish we could just keep it simple the way it is.
Should we just make clean URLs a requirement of farmOS?
Comment #3
m.stentaPostponing this until we get some more opinions on the matter. ;-)
Comment #4
m.stentaAll farmOS repositories have been merged into the farmOS distribution (see #2876992: Merge farmOS repositories into drupal.org/project/farm). I'm going through and moving all open issues from the various project issue queues to the central queue now...
Comment #5
m.stenta@quicksketch's (old) comment in a related core issue suggests the second approach I described in my comment #2 above: https://www.drupal.org/node/481560#comment-4664122
Comment #7
m.stentaI passed the base path in as a JS setting. This is fixed now.