9.0.0-beta.1 template wrapper and memberpress plugin


#1

I’m trying to set up the MemberPress plugin with Sage 9. Some of the template pages from the plugin are not displaying (blank white page, nothing in view source). I think it must have something to do with the template wrapper or blade.

Any ideas of what I should try?


#2

blank page = errors somewhere in log files. Find them and post them.

We can’t possibly be of any help without more error information.


#3

looking for the log files… (in vagrant?)


#4

Depends on your setup. Are you using Trellis? If so you can find them in /srv/www/site_name/logs. If not, I can’t really know.


#5

If you define WP_DEBUG_LOG as true, you’ll have a log file in wp-content or app folder.

https://codex.wordpress.org/Debugging_in_WordPress


#6

I was able to access the logs both ways. In the logs on the vagrant server, I did see some errors for “headers already sent” but I was not able to correlate that with the blank page I’m seeing. Still working on it. Thanks for your help.


#7

“Headers already sent” usually indicates a PHP error. If you’re not using Trellis, make sure define( 'WP_DEBUG', true ); (https://codex.wordpress.org/WP_DEBUG) is set in your functions.php to see the error.


#8

Still working on this. This route shows a white page.

http://domain.dev/register/pro/

Yet most other pages with the memberpress plugin appear to be working fine.

If I switch to twentytwelve theme the route works.
If I switch back to Sage and copy single.php into the root of my theme, it tries to display the page but with many php errors due to missing files.

Now I’m sifting through the plugin for clues. Also looking through logs.

Any ideas?


#9

here’s an error in the log:

   [sub_count] => 1
    [pending_sub_count] => 1
    [active_sub_count] => 0
    [suspended_sub_count] => 0
    [cancelled_sub_count] => 0
    [memberships] =>
    [last_login_id] => 20
    [login_count] => 1
    [total_spent] => 0.00
    [created_at] => 2017-01-15 01:42:49
    [updated_at] => 2017-01-15 01:42:49
)" while reading response header from upstream, client: 192.168.50.1, server: yankeetradesman.dev, request: "POST /register/pro/ HTTP/1.1", upstrea$
2017/01/15 01:45:20 [error] 2002#2002: *940 FastCGI sent in stderr: "PHP message: *** MemberPress Debug: Member Data for 3
PHP message: *** MemberPress Debug: MEMBER DATA: stdClass Object
(
    [user_id] => 3
    [first_txn_id] =>
    [latest_txn_id] =>
    [txn_count] => 0
    [expired_txn_count] => 0
    [active_txn_count] => 0
    [sub_count] => 0
    [pending_sub_count] => 0
    [active_sub_count] => 0
    [suspended_sub_count] => 0
    [cancelled_sub_count] => 0
    [memberships] =>
    [last_login_id] =>
    [login_count] => 0
    [total_spent] =>
    [updated_at] => 2017-01-15 01:45:20
)

PHP message: *** MemberPress Debug: EMPTY MEMBER?!
PHP message: *** MemberPress Debug: Member Data for 3
PHP message: *** MemberPress Debug: MEMBER DATA: stdClass Object

#10

What are the missing file errors? It’s difficult to troubleshoot without knowing what’s actually happening.


#11

added more to the error above


#13

Hi, I have same problem.

This route shows a white page.
http://domain.dev/register/〜

so, check wp_debug_log, but no error.

Any idea?


#14

After a long break, I’m working on this problem again. I really want to use Sage 9 with MemberPress. I can’t get it to display the templates for some pages. When I switch to Sage 8, it’s able to display a page at:
http://domain.test/register/freedom/
(“freedom” is the name of the memberpress membership)
It’s trying to use page.php for this page. It works with Sage 8 activated, but not with Sage 9.

With Sage 9, it gives a completely white page.

I’ve looked at the log file here:
/srv/www/domain.com/logs$ nano error.log

It looks empty.

Any thoughts on what’s happening and why it can’t find the template?


#15

If you’re getting the white screen with nothing on it, that’s probably not a “can’t find a template” error: When WordPress can’t find a template, it generally falls back to the next template “up the chain,” all the way back to index.php. If other pages display, then it’s able to find templates and would fall back for the troublesome page, which suggests to me that finding templates isn’t the problem.

For starters, I’d go through this page, and see if anything seems to match up or works: https://codex.wordpress.org/Common_WordPress_Errors

If none of those work, then I would start looking at filters and actions that Sage and Memberpress are hooking into, especially “early” ones, like init: If you’re getting a white page, that means something is failing before WordPress can even start to generate the page, which usually means something with a filter or an action (or, possibly, something in functions.php). Look through the code in Sage and Memberpress for any calls to add_action() or add_filter() and see if they’re conflicting.

This could also be a typo, but I notice you said that the URL you’re trying to visit is on domain.test but the directory you’re looking for logs in is domain.com. You would need to look in /srv/www/domain.test/logs/ for log files on domain.test if you’ve provisioned your server with Trellis normally.


#16

I will try your advice.

For the folder “domain.com” that’s correct. I have my local dev project folder named “.com” so I guess in vagrant it’s mapped to whatever that folder is named. The hosts file is setup with “.test”


#17

Possible clue. I noticed everything works fine with sage 9, blade and memberpress plugin as long as the route is only one level:

http://domain.test/account
but not
http://domain.test/register/freedom/

Do I need to add controller paths or something??

Ideas?


#18

did you ever figure this out?


#19

I’m also curious, I just ran into this error and was planning on building a site using MemberPress and Sage 9. Any tips? Really hoping to get this working.