Skip Navigation

[Resolved] Toolset Access conflict with LearnDash

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by Nigel 1 year ago.

Assisted by: Nigel.

Author
Posts
#2668855

Since the new version 2.8.17 of Toolset Access there is a conflict with the famous LearnDash Plugin. The LearnDash groups are no longer visible in the LearnDash dashboard menu. On our live sites we've moved back to version 2.8.16, which makes it work again. So there must be some changes in version 2.8.17 which are causing this issue. Kind regards, Christian.

#2668919

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Christian

This was reported by another client a week or two ago, and is already escalated to the developers.

Given that we have a second report I have now added an erratum for this issue: https://toolset.com/errata/learndash-sub-menu-item-groups-becomes-top-level-menu-when-access-active/

I've also added this thread to the internal ticket; now we have another report it should help bump the priority.

I'm marking this as escalated, and will let you know when we have some feedback from the developers.

#2668927

Thank you Nigel! I'm looking forward to the fix.

#2674449

Hi Nigel, we're curious whether there will be a fix by Christmas. Kind regards, Christian.

#2674687

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Christian

I took another look at this myself to see if I could identify a workaround, and realise the problem relates to how LearnDash registers the Groups custom post type, and it is relatively straightforward to filter the argument in question to correct that.

I've provided details in this erratum: https://toolset.com/errata/learndash-lms-groups-menu-item-in-wrong-position-if-access-active/

If you apply that workaround you should find the problem resolved.

#2674759

Hi Nigel, thank you so much for this workaround. It works perfectly. Should we share this plural issue with the LearnDash people? Or do you implement the workaround in the next toolset access version?

#2674763

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

There's nothing for us to fix, the problem arises because of how the post type is registered.

Now, to be fair to LearnDash, it makes no difference to LearnDash when considered in isolation, but it can have ramifications in the context of LearnDash in the wider WordPress eco-system where interoperability with other code is important.

You are welcome to share this with LearnDash, it would imply a trivial change on their part that would not affect their own code beyond the small change to the capability_type parameter.

The function register_post_type expects this to be a singular string (e.g. "group") or an array specifying both singular and plural forms (e.g. [ "group", "groups" ] ), but currently it is registered as a plural string ("groups").

The workaround I shared simply hooks into the post type registration and modifies the provided parameter value.

#2674765

Okay, then I'll share this with LearnDash. Thank you for helping us!!! My issue is resolved.

#2675411

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Actually Christian, the developers were working an update for something else with Access, and realised they can easily bypass this problem altogether, so the workaround won't be required.

The update for Access should be available before the end of the week, I'll let you know.

#2675779

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The update will be released next week.

If you don't want to wait you can download the update from this link and update your site manually: https://toolset.com/patches/types-access.2.9.0.zip

If you experience any problems please create a new thread (I'll be off next week, if you create a new thread someone else will be able to help you).