AnsPress shortcode cannot be used inside AnsPress content.
Removing the lines at the location suggested did work, but they are different in my version (2.4.8 is installed).
Each of the following lines needed to be removed or commented out:
if ( true === $ap_shortcode_loaded ) {
_e(‘AnsPress shortcode cannot be used inside AnsPress content.’, ‘anspress-question-answer’ );
return;
}
Is this likely to cause something else to break Rahul?
I’ve attempted to use the zip provided but still have the problem. I need to fix it quickly or I will be forced to move on to another forum plugin.
In hopes someone can still help me get this fixed, here’s a fuller description.
I have two pages that each are meant to have forums (http://higherselfyoga.org/hsy-cafe/hsy-kids/ and http://higherselfyoga.org/hsy-cafe/hsy-for-men/). In each case the shortcode used on the page refers to the category for that page, i.e. [anspress categories=”hsy-for-kids”] or [anspress categories=”hsy-for-men”].
Everything appeared to be working fine until I updated to 2.4.8, but now it simply shows the error “AnsPress shortcode cannot be used inside AnsPress content” on both pages where the forum was before.
Can anyone help??
Open wp-content/plugins/anspress-question-answer/includes/shortcode-basepage.php and go to line 47
and then remove this:
if ( true === $ap_shortcode_loaded ) {
return __('AnsPress shortcode cannot be used inside AnsPress content.', 'anspress-question-answer' );
}
and save.
Is your issue not solved yet? If so you can send me site details to [email protected], I will have a look.
I have provided a fix. Download and manually replace file in AnsPress. https://github.com/anspress/anspress/archive/2.4.7.zip
Thanks for the fix. What files need to be replaced?
Why is there a build folder that includes a zip file of the plugin within this plugin? Also, all the dates on every file are March 26. Is that accurate? What exactly needs replacing?
Simply replace all files of AnsPress using this zip
Thanks. But should that build folder be included? It contains a zip file with an older version of the plug-in. Seems like that was accidentally included.
Something is wrong with the archive indeed.
I unzipped and uploaded this file and regretfully it did not change anything. I still see the comment on every page. I will manually remove them from the file as mentioned below, but is a fix coming? I don’t want to have this solution overwritten with the next update.
I just downloaded the plugin for the first time and when I went to /questions, I saw this error. I downloaded your zip file and replaced all of the files on the server, but I see the same problem. Any other ideas?
This will happen only if you are trying to load AnsPress shortcode inside it. Can I know how you are calling AnsPress shortcode?
I’m getting the same message on user profile pages. No code has been added to those pages
Which page? or all user pages?
At first I thought it was only on user pages but now I’m noticing it on every page: http://parsecenergy.com/eusave-forum/
Replace code of that whole file using this one: https://github.com/anspress/anspress/blob/2.4.7/includes/shortcode-basepage.php