CRM-13366 manage event: redirects to different event on save

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.5, 4.4.0
    • Fix Version/s: 4.4.0
    • Component/s: CiviEvent
    • Labels:
      None

      Description

      strange behavior when saving an event. reproducible on both demo and sandbox.

      1) edit an existing event by entering the PCP page
      2) turn PCP on, select a profile, and save
      3) turn PCP off and save
      >> a different event loads and the PCP was not disabled for the original event.

        Attachments

          Activity

          [CRM-13366] manage event: redirects to different event on save
          Brian Shaughnessy added a comment -

          found the issue:
          CRM_Event_Form_ManageEvent::preProcess()
          around line 108 we have:

          if (empty($this->_addProfileBottom) && empty($this->_addProfileBottomAdd)) {
          $this->add('hidden', 'id', $this->_id);
          }

          at some point, the _id shifts from the event ID to the PCP ID and is set to the form as a hidden value. when the preProcess is called a second time on form submit, this value is retrieved instead of the main ID for the event (I believe from $_GET).

          I'm not sure why we are setting that value for the profiles, but if we exclude the PCP page from that var set, it fixes it.

          Ravish Nair added a comment -

          Tested. Working fine.

            People

            • Assignee:
              Ravish Nair
              Reporter:
              Brian Shaughnessy

              Dates

              • Created:
                Updated:
                Resolved: