Checking and saving "Add another location from node view page" still displays checkbox as unchecked. Also, even when this is set correctly, the "Add location" form doesn't appear on node view.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tommycox’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.07 KB

This patch fixes the checkbox not appropriately displaying as checked when saved as such. However it appears as if there's still no "add another" form generated on the node view page. That should be opened as a new issue if you're still seeking this functionality.

tommycox’s picture

Title: "Add another location from node view page" setting does not save » "Add another location from node view page" not working
Issue summary: View changes
FileSize
3.34 KB

Instead of creating a new issue I've revamped this patch to fix the feature completely; updated title and issue summary.

Cheers!

tommycox’s picture

Priority: Normal » Critical

Changed priority to critical since the issue renders location_addanother unusable and is without workaround

podarok’s picture

Priority: Critical » Major

Well, it is not critical. I agree that it is major, but it doesn't brake a site.

Status: Needs review » Needs work

The last submitted patch, 2: location-add_another_not_working-1601170-2.patch, failed testing.

tommycox’s picture

Re-rolled patch from #2 with some additional commenting and code cleanup

tommycox’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: location-add-another-location-1601170-7.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: location-add-another-location-1601170-7.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: location-add-another-location-1601170-7.patch, failed testing.

tommycox’s picture

It looks like the testbots are having some issues. Will probably have to wait for https://www.drupal.org/node/2375345 to clear up before re-testing

Status: Postponed » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: location-add-another-location-1601170-7.patch, failed testing.

tommycox’s picture

Status: Needs work » Postponed

Status: Postponed » Needs review
tommycox’s picture

The tests for this patch are getting held up from a failed test on the Location module (https://qa.drupal.org/pifr/test/290218) due to #2375345: Dependency on core module results in PHP Fatal error: Cannot redeclare system_requirements(). Somehow those tests need to be rerun.

podarok’s picture

Status: Needs review » Needs work
  1. +++ b/contrib/location_addanother/location_addanother.module
    @@ -10,11 +10,21 @@
    +  // and the user has access to edit the node
    

    add fullstop please

  2. +++ b/contrib/location_addanother/location_addanother.module
    @@ -29,12 +39,15 @@ function location_addanother_node_view($node, $view_mode) {
    +  // Load the content type's location settings to see if addanother is enabled
    

    fullstop

  3. +++ b/contrib/location_addanother/location_addanother.module
    @@ -73,14 +85,20 @@ function location_addanother_form($form, &$form_state, &$node) {
    +  // Load the stored node from form_state
    

    fullstop

  4. +++ b/contrib/location_addanother/location_addanother.module
    @@ -73,14 +85,20 @@ function location_addanother_form($form, &$form_state, &$node) {
    +  // Load the content type's location settings to see if addanother is enabled
    

    fullstop again

  5. +++ b/contrib/location_addanother/location_addanother.module
    @@ -73,14 +85,20 @@ function location_addanother_form($form, &$form_state, &$node) {
    +  // or the user doesn't have access to add a location
    

    fullstop

  6. +++ b/contrib/location_addanother/location_addanother.module
    @@ -73,14 +85,20 @@ function location_addanother_form($form, &$form_state, &$node) {
    +    count($node->locations) >= variable_get('location_maxnum_' . $node->type, 0) ||
    

    You have to add varible removing to hook_uninstall()

#7 needs work

tommycox’s picture

Added fullstops and added variable removing to hook_uninstall()

tommycox’s picture

Status: Needs work » Needs review
podarok’s picture

Status: Needs review » Fixed

#21 commited
Thanks!

  • podarok committed 362e9d3 on 7.x-3.x authored by Tommy Cox
    Issue #1601170 by Tommy Cox, podarok: "Add another location from node...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.