Taimurian/oxygen-memberpress-support

activate plugin, get a blank screen with memberpress courses addon

Opened this issue · 1 comments

I have the memberpress courses addon installed in addition to memberpress. If I only activate the plugin (no files in the mepr_templates folder) the course or lesson pages are blank. error_log shows:

[07-Dec-2021 16:08:03 UTC] load_cpt_from_id didn't find ID=6
[07-Dec-2021 16:08:06 UTC] load_cpt_from_id didn't find ID=243
[07-Dec-2021 16:11:33 UTC] load_cpt_from_id didn't find ID=187
[07-Dec-2021 16:15:45 UTC] load_cpt_from_id didn't find ID=187

CPT # 187 is the id of the course. I am not sure what the other ids are.

In addition, the curriculum is not loading. It's probably all related.

The account & login forms appear to be unaffected.

I changed this one line, and the course/lesson pages come up. Note the capitals & spelling difference.

add_filter( 'MEPR_VIEWS_PATH', 'memberpress_template_dir' );

I am not that familiar with filters, so pardon my poor code if this is not the right way to do it.

However, I still get the "load_cpt_from_id didn't find ID..." errors. Template mods for the courses do not get picked up. I think it's do do with the folder structure. course templates are under "plugins/memberpress-courses/app/views/classroom" as one example.

The views namespace for courses is defined as memberpress\courses\VIEWS_PATH if this helps.