AnsPress shortcode cannot be used inside AnsPress content.

12.91K viewsUpdates
1

Getting the following error on all AnsPress sections of site after updating today:

 

AnsPress shortcode cannot be used inside AnsPress content.

 

Please help!

1

The replacement file from github seems to work great.

Thank you so much for your help Rahul!

0

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?

commented on answer
0

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??

edited comment on answer

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.

0

I tried replacing all files with the files in the zip provided (including the build folder, which seems to be a mistake).

 

Doesn’t appear to fix anything.

 

Can anyone help?

0

Has anyone managed to fix the issue with the zip Rahul provided?

commented on answer

Is your issue not solved yet? If so you can send me site details to [email protected], I will have a look.

0

I have provided a fix. Download and manually replace file in AnsPress. https://github.com/anspress/anspress/archive/2.4.7.zip

commented on answer

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?

0

This will happen only if you are trying to load AnsPress shortcode inside it. Can I know how you are calling AnsPress shortcode?

edited comment on answer

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/

0

have the same

Rahul, how to fix it ?