Closed Jany-M closed 7 years ago
Hey @Jany-M it appears what you want to do is add fields to the "personal info" fieldset along with customizing with the three column donation selector. That's pretty neat. I checked out the pastebin you posted and couldn't see any of the custom fields your show in your screenshot. Are you sure that's all the code? If not, please provide the entire code so we can help out further.
Note, that this also appears to be not an issue with the plugin and this question likely should be posted rather to wordpress.org or via our priority support channel on givewp.com if you are a customer of ours.
The fields are set in the Field Manager, no need to add them through code, they're in the campaign metabox.
The issue isn't with the customization itself it appears, since even when I disable fully all those functions, the issue is still there, but ONLY with campaigns that I have updated since Give upgrade. All the campaigns that have not been updated yet, still look ok. How do you explain that?
Error log shows no signs of Give issues, nor I see any notice when WP_DEBUG is on.
@Jany-M there must be something going on there that we'd love to help uncover. Would you mind using our priority support channel and we'll dig into it further through that channel? Please reference this issue and we'll jump right in: https://givewp.com/support/
I did, please check ticket #7350
Thanks @mathetos or @Benunc will be on it asap. If needed, I'll jump in too 😄
@Jany-M I sent you revised code before 2pm Pacific today, please check that. The issue is that your remove_action
was not working with a high enough priority.
It looks like the issue was that after the upgrade, the Form Field Manager had reset to display Above all fields in all campaigns. It took us a while to notice (you dont expect an upgrade to reset settings), that's why if we updated a campaign it would mess it up. I didn't need to replace our code with yours, everything is fine now (actually, replacing with your code makes it quite messy).
Thank you for looking into this, but I advise you make sure campaign settings dont get reset, in the next upgrades (2 things reset in all campaigns: Guest Donations and Form Fields display).
We use custom functions/logics to show the custor form in each campaign. After updating to latest Give + addons, some of the campaign options reset (eg. Guest Donation was set to Disabled). Most importantly, after updating any campaign (even without changing any settings inside), the custom form fields now display in a different location (different hook??). The campaigns that have not been updated/saved, after the upgrade, dont have this issue (yet).
This is how it used to look like (correct):
This is how it looks now (wrong):
Here is a pastebin with the custom functions we used, to achieve the correct single campagin layout https://pastebin.com/ffhuq9vY (line 94 onwards)
UPDATE
After replacing some old hooks there, and even after removing completely those functions, the issue is still there and still only happens when we update a campaign, hence I do believe the issue goes deeper than this, or the non-updated campaigns would have the same issue.
Why is the form not displaying correctly simply if we update a campaign?