Fatal Error: get_page_permastruct
-
Hello,
I’ve installed ProfileGrid and am using it with mapping to RegistrationMagic. I had things pretty close to done but made a change (I wish I remembered exactly what). It could have been in the form mapping but it also may have been in the global settings. Immediately after whatever change I made my site (local fortunately) received a fatal error.
The call starts in your plugin file public/class-profile-magic-request.php in profile_magic_get_frontend_url method with this line of code in post is published condition:
$url = get_permalink( $profile_magic_url );
After digging through code it eventually fails in /wp-includes/link-template.php inside the _get_page_link() method when it calls this method:
$link = $wp_rewrite->get_page_permastruct();
I can var_dump $wp_rewrite and it has a lot of output but I get the impression it isn’t properly instantiated as it seems like the get_page_permastruct is not available.
Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null in /…/wp-includes/link-template.php
On the off chance that I could still implement my changes on the live site I commented out the offending line and was able to then export the configuration json and import it to the primary site. It failed the same way, so, it seems like there is a setting issue in one of the configurations that the code then can’t properly parse or otherwise handle.
Your help would be appreciated. I can send you the JSON if you’d like. Nothing looks off to me and the JSON is properly formed. I did try removing this value from the associated wp_options db entry as it was the only one that looked complicated, but it didn’t help.
{
“option_name”: “pm_profile_tabs_order_status”,
“option_value”: “s:928:\”a:7:{s:8:\”pg-about\”;a:4:{s:5:\”title\”;s:5:\”About\”;s:6:\”status\”;s:1:\”1\”;s:2:\”id\”;s:8:\”pg-about\”;s:5:\”class\”;s:12:\”pg-about-tab\”;}s:9:\”pg-groups\”;a:4:{s:5:\”title\”;s:6:\”Groups\”;s:2:\”id\”;s:9:\”pg-groups\”;s:5:\”class\”;s:12:\”pg-group-tab\”;s:6:\”status\”;s:1:\”0\”;}s:7:\”pg-blog\”;a:4:{s:5:\”title\”;s:4:\”Blog\”;s:2:\”id\”;s:7:\”pg-blog\”;s:5:\”class\”;s:11:\”pg-blog-tab\”;s:6:\”status\”;s:1:\”0\”;}s:11:\”pg-messages\”;a:4:{s:5:\”title\”;s:8:\”Messages\”;s:2:\”id\”;s:11:\”pg-messages\”;s:5:\”class\”;s:14:\”pg-message-tab\”;s:6:\”status\”;s:1:\”0\”;}s:16:\”pg-notifications\”;a:4:{s:5:\”title\”;s:13:\”Notifications\”;s:2:\”id\”;s:16:\”pg-notifications\”;s:5:\”class\”;s:19:\”pg-notification-tab\”;s:6:\”status\”;s:1:\”0\”;}s:10:\”pg-friends\”;a:4:{s:5:\”title\”;s:7:\”Friends\”;s:2:\”id\”;s:10:\”pg-friends\”;s:5:\”class\”;s:13:\”pg-friend-tab\”;s:6:\”status\”;s:1:\”0\”;}s:11:\”pg-settings\”;a:4:{s:5:\”title\”;s:8:\”Settings\”;s:6:\”status\”;s:1:\”1\”;s:2:\”id\”;s:11:\”pg-settings\”;s:5:\”class\”;s:14:\”pg-setting-tab\”;}}\”;”
}Cheers,
Jeff
- The topic ‘Fatal Error: get_page_permastruct’ is closed to new replies.