Problem with Campaign
-
Hi,
I tried to create campaign and the donation button does not appear in donation page instead it output errors as below“campaign_hide_time_remaining” in /var/www/html/wp-content/plugins/charitable/includes/admin/campaign-builder/fields/class-campaign-summary.php on line 165
Thank you.
-
@awisqirani Thanks for reaching out! Here’s a list of things to try or give back to us for more information.
- Was there any more to the error message (perhaps before the text you shared)? Are you seeing this on the admin or frontend/template?
- Can you give us the steps you took to replicate the issue, so our team can attempt to reproduce it over here?
- Does this show on a blank campaign template (say 2 column) with just the donation button? Do you have any other campaign fields on the campaign page?
- Is this error visible on a public URL (or can you confirm where you are seeing this error message), and if so can you share that?
- Can you confirm what version of Charitable you are running?
If also possible (especially if there is nothing more to the message) can you enable logging as shown on this page. Edit wp-config.php on your WordPress root directory and add:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );When you’ve done this, repeat the issue and you can share the debug.log file that should have been generated (or share the errors in that file you see) with us. You can paste this into https://pastebin.com/ or https://gist.github.com and share a link with us.
Thanks. As soon as you share more information I’ll pass this along to our team!
Hi,
- Was there any more to the error message (perhaps before the text you shared)? Are you seeing this on the admin or frontend/template?
On Admin side, I also notice this errorNotice: Function map_meta_cap was called?incorrectly. The post type?campaign?is not registered, so it may not be reliable to check the capability?edit_post?against a post of that type. Please see?Debugging in WordPress?for more information. (This message was added in version 4.4.0.) in /var/www/html/wp-includes/functions.php on line 6085
- Can you give us the steps you took to replicate the issue, so our team can attempt to reproduce it over here?
I install Charitable and straight away create campaign, and when viewed it showed that error - Does this show on a blank campaign template (say 2 column) with just the donation button? Do you have any other campaign fields on the campaign page?
The campaign only have 3 layouts (Campaign Summary, Campaign Description, Donate Button) - Is this error visible on a public URL (or can you confirm where you are seeing this error message), and if so can you share that?
I am using WordPress in Docker hosted locally - Can you confirm what version of Charitable you are running?
Version 1.8.2
Log – https://pastebin.com/U9RmYihy
This is the sample of the same error I found when searching online (this is not my site)
https://facforthehomeless.org/campaigns/sweet-home-sleep-center-2/
- This reply was modified 1 month ago by Awis Qirani.
- This reply was modified 1 month ago by Awis Qirani.
@awisqirani Thanks for the response.
Thanks for that additional information! What I was looking for was text in the same line before “campaign_hide_time_remaining”. Your logs and the sample of the same error you provided at the end confirms this is a PHP “Warning”. It’s not a critical error and the error itself (while should be corrected) shouldn’t be shown on a production site. To prevent this (and any other similar errors generated by any plugins, not yet Charitable) and would be adjusted by setting error logging to off.
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );By the sounds of it, you had error display on at the beginning – similar to how the sample site has this on- because you could read the message. So turning off such warnings after debugging is recommended. It’s possible a plugin might be forcing this on as well.
Let’s focus on the donation button “not appearing” because the error might not be related to that.
“Campaign Summary, Campaign Description, Donate Button” are fields, not layouts. So what I was trying to ask is if you selected a particular template (2 column or a pre-built template maybe with a theme). If you simply created a new 2 column template and added – for example – a donation button… and published the campaign would you still get the error and would the button appear? Follow these steps:
1. Click “Add New” In Charitable to create a new campaign (from the main menu or Campaign page)
2. You should see a list of templates. Click the 2 column template.
3. Name the campaign.
4. Drag over the campaign button to the empty editing field on the right.
5. Save and publish the campaign, then view it live.
The “warning” shouldn’t prevent the donation button from being shown (your sample of the same error proves that) so we are focused on the button issue in particular.
We preformed the same test on a 1.8.2 version and got the donation button to appear, so if it’s not working for you then the best suggestion would be to provide screenshots of each step (or a video if that’s possible). A public URL of the page would also be appreciated – that way we can tell if the button is hidden somehow. We couldn’t locate any errors or warning in your logs outside of the one already discussed but feel free to clear your logs and provide another file in the above text.Meantime, I’ll let our team know and the warning itself will be assuredly resolved in the next update. Thank you!
Hi,
I try follow the steps given and the Donate button is there. Thank you for your help.@awisqirani You’re welcome. Feel free to reach out again. And I’ve confirmed the PHP warning seen will be addressed in the next Charitable release. Thank you!
- You must be logged in to reply to this topic.