Jump to content

Custom Block Error 500


Jesse Rapczak

Recommended Posts

Hey guys, I'm adding a custom block with some php code and it just throws me an error 500 whenever I try to the load the page.

Just to test it out I'm using the sample SSO code from the documentation, which is simple enough. But whenever I save it and view the page that the block is on I get an Error 500.

/* Require the init.php file from the Community Suite root directory */
require '/path/to/suite/init.php';

/* Initiate the session to verify who this user is */
\IPS\Session\Front::i();

/* Print the user's name */
print \IPS\Member::loggedIn()->name;

That's the exact code I have in my custom block

Link to comment
Share on other sites

Custom Block? You mean you're adding this code in your ACP  to the block?
If yes, then you don't need following part because IPS4 is already initialized 
 

/* Require the init.php file from the Community Suite root directory */
require '/path/to/suite/init.php';

/* Initiate the session to verify who this user is */
\IPS\Session\Front::i();

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...