Skip Navigation

[Resolved] Bug when entering taxonomy tag

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 11 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2687245
WP-Bug with tags.JPG

Dear Toolset team,

when I create on frontend with a cred form a new post and input a tag, it shows a strange dropdown window under the tag-field (in German “Schlagwörter”), see the right part of the attached screenshot. This happens when I start typing in a tag which is already saved in the system. Moreover I found that this only happens for non-logged in users or for users which are logged in with another role then admin. Means, for admins it looks normal, as we also see on the left side of the screenshot as I was logged in as admin when making this screenshot.

PS: I also created a new taxonomy called “Hashtags” which you see directly under “Schlagwörter” and the bug is the same

Can you please fix this bug or tell me how I can fix it.

Thank you and kind regards
Andreas

#2687361

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I've few questions that will help me to reproduce the issue:

- Can you please tell me using what role you logged in using which you able to see the issue?
- Have you created custom role using Toolset Access plugin?

Once you confirm the role I will try to reproduce the issue with the same role.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2687362

Hi Minesh,

please find here my answers:
- The issue occurs on the one hand when I am logged in with the default role ‘Subscriber’ but it also happens when I am not logged in at all. I think this is then the Visitor-role. But I tested it also with other roles and it seems it happens for all roles except admin
- I have not created a custom role

I also added the debug information.

Thank you so far
Andreas

#2687368

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I just checked with clean installation on my local server where I've added custom taxonomy "Colors" and I set it to "Flat - like post tags, with a text input to enter terms" and assign this taxonomy to one of the post type and added few terms (Black, White, Green, Red, Blue).

Then I created a form to add new items and displayed the form for both loggedin and non-loggedin users and when I check as both loggedin and non-loggedin user and try to type the term name in the taxonomy box I can see its working as expected without any issues. Please check the following screenshot:
- hidden link

In order to minimize the cause of the issue and to ensure there is no conflict between the theme or plugins you use:

Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference?

#2687749

Hi Minesh,

my issue is solved. It was caused be a code which I took from a link from this thread https://toolset.com/forums/topic/dont-show-wordpress-backend-to-users

I was this code

function baw_no_admin_access()
{
if( !current_user_can( 'administrator' ) && stristr( $_SERVER['REQUEST_URI'], '/wp-admin' ) !== false ) {
wp_redirect( home_url() );
die();
}
}
add_action( 'init', 'baw_no_admin_access', 1 );

After some further research I found this code

add_action( 'init', 'wpster_blockusers_init' );
function wpster_blockusers_init() {
if ( is_admin() && current_user_can( 'subscriber' ) &&
! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect('/');
exit;
}
}

and this brings the same functionality but without causing a bug at another end. Best would be that you are someone of the team enhances the thread above for other users.

Thank you and best wishes
Andreas