Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: missing Landing Page for the campaign created during the onboarding wizard #7769

Open
wants to merge 2 commits into
base: epic/campaigns
Choose a base branch
from

Conversation

glaubersilva
Copy link
Contributor

@glaubersilva glaubersilva commented Feb 28, 2025

Resolves GIVE-2282

Description

This PR moves the logic to create a new campaign landing page from the CampaignRequestController.php file to the givewp_campaign_created hook which is proper because this way we can have the landing page created and attached to the campaign automatically when using the Campaign::create() method. So these changes fix the bug that was creating the campaign on the onboarding wizard without a campaign landing page attached to it.

Affects

The campaign creation workflow and the campaign creation on the onboarding wizard.

Visuals

This PR fixes this bug:

https://www.loom.com/share/d6800929b2fd4f7f9082d4a86a9ef79f?sid=d37c73d1-8dc6-437b-9cfa-274dd55a8994

Testing Instructions

  1. You can create a new test site or enable the Give > Settings > Advanced > Setup Page option and delete all your campaigns/forms directly on DB.
  2. Access the Setup page and create the onboarding campaign;
  3. Go to the campaign details page created previously and make sure the "View Campaign" link is available on the 3 dots menu;
  4. Click on the "Edit campaign page" button and make sure you are not redirected to the wp-admin/edit.php page.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@glaubersilva glaubersilva self-assigned this Feb 28, 2025
@glaubersilva glaubersilva marked this pull request as ready for review February 28, 2025 18:56
@pauloiankoski pauloiankoski self-requested a review February 28, 2025 19:40
Copy link
Contributor

@pauloiankoski pauloiankoski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked it! We are now creating the campaign page in the same way we create the donation form, ensuring that all side effects of campaign creation follow the same pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants