Images with a valid file type (e.g. PNG – Mime type ‘image/png’) and a not lowercase version of the extension (e.g. ‘image.PNG’ instead of ‘image.png’) are not handled correctly.
They are not considered images (even though they are) purely due to the fact that the extension is not fully lowercase. Therefore, in the rich text editor, it is not added as img. Consequently, the image is also not being moved/stored correctly in the final location (‘anspress-uploads’) and the temporary storage location (‘anspress-temp’) is not replaced for the img src.
lib/form/class-upload.php
contains code that constructs a $new_file_name
based on the original file extension (see here).
However, includes/upload.php
contains code that determines if a file is an image based on the (original) extension (see here). is_image
is then incorrectly set to false
as a result (with all the consequences as described above).
I noticed a comment in the code (see here) that the code responsible for uploading the file was copied from WordPress Core. However, I don’t think this is up to date anymore. It should simply be uploaded with a normalized filename. Just as is done here through $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
(see also Inserting images into posts and pages). Then this problem could not occur in the first place since there is simply no possibility of adding different versions of casing of the same extension.
This is a serious problem because users upload images that are permanently lost. I would like to see this resolved, as I understand this is something the plugin is supposed to fix.
Note that this is something going on recently because of this change (Apr 17, 2024).
]]>I want to change the color of buttons associated with this plugin.
For example, the submit question button, ask question button, etc…
]]>Hi, I have a problem with comments – non-loggedin users can’t comment. Here “Who can post comment?” I set – anyone, includin non-loggedin but I get error – Someting wrong. Where is the problem? Thx for help
]]>Are you going to add chatgpt auto answer? this is the only main thing i think its missing
]]>Hi,
I have a problem with DS. I see this error PHP Warning: Constant DS already defined in /home4/root/website.com/wp-content/plugins/anspress-question-answer/anspress-question-answer.php on line 273
private function setup_constants() {
$plugin_dir = wp_normalize_path( plugin_dir_path( __FILE__ ) );
define( 'DS', DIRECTORY_SEPARATOR );
define( 'AP_VERSION', $this->_plugin_version );
define( 'ANSPRESS_DIR', $plugin_dir );
define( 'ANSPRESS_URL', plugin_dir_url( __FILE__ ) );
define( 'ANSPRESS_WIDGET_DIR', $plugin_dir . 'widgets/' );
define( 'ANSPRESS_THEME_DIR', $plugin_dir . 'templates' );
define( 'ANSPRESS_THEME_URL', ANSPRESS_URL . 'templates' );
define( 'ANSPRESS_CACHE_DIR', WP_CONTENT_DIR . '/cache/anspress' );
define( 'ANSPRESS_CACHE_TIME', HOUR_IN_SECONDS );
define( 'ANSPRESS_ADDONS_DIR', $plugin_dir . 'addons' );
}
On line 273 is this define( ‘DS’, DIRECTORY_SEPARATOR );
How to fix this please?
]]>I have tried EVERYTHING to get the category pages to simply show the questions within the category. I am using elementor’s hello theme. I have the same issue with 2022 and 2024 Themes. I also tried Astra Theme at which it would not load the category pages at all.
I have tried the permalink steps repeatedly. I was even open to creating an archive page for the categories with Elementor – that’s not an option.
I simply need to know how can I get the questions to show under the categories.
]]>hello i want to change the https://www.sebebinedir.com/soru/ayaklarin-sismesinin-sebebi-nedir/answer/336 “answer” slug in the url. to something in another language. i used the loco translate as well but tnothing helps ithink its hard coded.
where can i find where it is?
it is not in settings of the plugin
category or other slugs change but this i s an automated generated slug within the question. its ok if the answers can be disabled with a url too
thank you
]]>Dear AnsPress Development Team,
I am writing to express my concern regarding the removal process of the AnsPress plugin from WordPress.
It has come to my attention that even after uninstalling AnsPress, residual data remains in the WordPress database. This persists despite selecting the appropriate deletion options in the AnsPress settings.
As a user, I find this situation problematic. Proper cleanup procedures are an essential part of quality software development and demonstrate respect for users’ systems and data.
I understand this issue has been known for some time, yet it appears no significant steps have been taken to address it. I kindly request that you consider implementing a more thorough uninstallation process that removes all plugin-related data from the database.
Your attention to this matter would be greatly appreciated and would significantly improve the user experience for those who choose to uninstall the plugin.
Thank you for your time and consideration.
]]>Getting this message when creating answer
]]>Hi, I need to allow non logged in users to upload image. How do I do this?
On Other Permissions i see only logged-in users to upload image option.
Thank you.
]]>Hi, thank you for these plugins. I have a problem with tags. In the labels I see this message:
data-type=”tags” data-options=”{“maxItems”:5,”form”:”form_question”,”id”:”form_question-tags”,”field”:”tags”,”nonce”:”f6904fa5ac”,”create”:true,”labelAdd”:”Add”}” class=”ap-tags-input” autocomplete=”off” aptagfield name=”form_question[tags]” value=”” />
]]>The font size for answers text is very small for mobile and desktop. I have tried to add some CSS codes but the issue is not resolved.
]]>Whenever I publish the answer in the main dashboard I see this error : “Please fill parent question field, Answer was not saved!”
Can you please suggest how to fix this?
Thank you
]]>Without logging in to the website, there is always a black toolbar at the top of the website, and I cannot turn it off. Can you help me? Thank you!
screenshot: https://ibb.co/q74Ckd9
It seems that the black toolbar is being generated by the “AndPress Question Answer” plugin. When I deactivate this plugin, the toolbar disappears.
Here’s a brief video demonstrating the issue:?https://d.pr/v/MOaflt
]]>1: Open file: /plugins/anspress-question-answer/addons/reputation/reputation.php
2: change the column name from ‘repu_user_id’ to ‘rep_user_id’
The bug will be triggered when delete a user.
Thanks!
]]>hi,
Fatal error: Uncaught Error: count(): Argument #1 ($value) must be of type Countable|array, string given in line 150 of wp-content/plugins/anspress-question-answer/addons/tags/tags.php!
the line 150 is:
$ap_max_num_pages = ceil( count( $tags_rows_found ) / $per_page );
So I changed it to:
<span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$ap_max_num_pages</span> = <span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">is_countable</span>(<span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$tags_rows_found</span>) ? <span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">ceil</span>(<span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">count</span>(<span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$tags_rows_found</span>) / <span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$per_page</span>) : <span class="hljs-number" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">0</span>;
Update it better please!
]]>Hi,
in /anspress-question-answer/templates/css/
the RTL.css must convert to rtl.css, because when the main page loads it shows 404 error in insepct elements!
]]>You have a database leak: a record is created when deleting questions in the ap_qameta table after the same ap_qameta record is deleted. Because of this, this qa_meta record is never actually deleted. This is because you have AnsPress_Hooks::delete_subscriptions hooked into before_delete_post at a priority of 10. This causes the hook to possibly fire AFTER the record is deleted, which performs an UPDATE/INSERT on the same record.
To fix this, you need to edit line 129 in includes/hooks.php so that the hook for before_delete_post (delete_subscriptions) is a lower priority, such as 5. This will cause all records to be deleted and no more leaks.
]]>Hi there, when trying to view the plugin’s pages, I get the following error message:
“This theme was built for the WordPress full-site-editing feature. If you use WordPress below version 5.9, you need to install and activate the Gutenberg plugin to make it work.”
I do have the Gutenberg plugin and have had it before installing Anspress, and WordPress is up-to-date as well.
Could I get any help regarding this problem, as I have no idea what causes it.
]]>Hello!
I’m attempting to create language versions for each forum using WPML. After creating pages in other languages, the ‘Make a question’ button appears.
However, upon clicking it, I’m redirected to the same page instead of the ‘/ask’ page. Interestingly, when I make a question from the backend and choose the language, it correctly places the question in the relative language forum.
I also found the same problem mentioned in the anspress forum here.
Any thoughts?
]]>Hi,1. is it possible to show part of the answer on the question page [anspress] and if users want to view full answer they can click question see here https://somup.com/cZnIDMpqgf
2. Is it possible for the categories to be shown properly? because here https://somup.com/cZnID7pqBH users might not know that they have to click on category to show all the categories
]]>Title. Does this plugin integrate with other membership plugins?
]]>WordPress database error Unknown column ‘repu_user_id’ in ‘where clause’ for query DELETE FROM tp_ap_reputations
WHERE repu_user_id
= 25427 made by wp_delete_user, do_action(‘delete_user’), WP_Hook->do_action, WP_Hook->apply_filters, Anspress\Addons\Reputation->delete_user
More exactly, change column name from ‘repu_user_id’ to ‘rep_user_id’ in reputation.php
]]>Hi can this be integrated into buddyboss as a voting system for forum topics and replies?
]]>Hi there, We have some Parent Category and each Parent Category has some Sub Category. When we post question then we will select the Sub category and there show the count number, how many question. But in the Parent Category still the Count is show zero. But in Parent Category, need to show the summation of count of all sub category under it. How can get this?
]]>Hi there, Can not comment on a Ans or Questions , if I click on the Comment button then it not working. When any one posted any question then he can not comment on the answer of that question. And the account Who posted the ans he also can not post comment. So who can post a comment on any question or ans?
]]>Security & Spam Risk? How to prevent user’s Email from being publicly displayed?
thanks!
]]>Error found in fields, please check and re-submit
what could be the cause?
]]>I’m using your plugin, but it doesn’t show the number of questions for the category,
it also changes the css code of the site. https://prnt.sc/pNBfan3fjMUM
]]>I’m seeing a Wordfence critical warning for this plugin:
AnsPress – Question and answer <= 4.3.0 – Authenticated (Editor+) Stored Cross-Site Scripting
The AnsPress – Question and answer plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 4.3.0 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with editor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
No known patch available. Please review the vulnerability’s details in depth and employ mitigations based on your organization’s risk tolerance. It may be best to uninstall the affected software and find a replacement.
To you plan to fix this problem? Do you have an estimate of when a fix may be available?
My client (and I’m sure many others) like this plugin and are put in a difficult situation of having to decide whether to deactivate or replace it.
Thanks!
]]>