Posted: November 13, 2018 at 11:08 am
|
I have registered a new messages templates pack. However, when I switch to the newley registered pack, in this case ACMS Template, it switches, but throws an error, too. After the error is thrown, I will get redirected to /wp-admin/undefined Interestingly though, the templates seem to have been pulled, because when I go back into the message type the new template pack is selected and the template contents are from the new pack. However, the error still persistent everytime I switch between default and the new pack. What is the problem? |
Hi, Some code in your custom message template is quite likely the problem. Can you upload the code to a gist and link here so we can take a look? |
|
|
Thanks for the quick reply. |
|
For development purposed I copied the default “new message pack” template files, so they should be ok. |
|
I found that the error resolves in Messages_Admin_Page.core.php in the public function switch_template_pack() which somewhere in there does the following:
Question now is why is $query_args[‘id’] empty? |
I have a few questions about your code, and maybe you’ve got other code for this, maybe not: is |
|
|
Yes, they are all globally defined define( ‘EE_NEW_TP_TEST_VERSION’, ‘1.0’ ); |
is this:
really a custom method, or are you trying to call |
|
Where? |
|
|
This is really a custom method, which does add_action(). |
If that’s the case, your code you’ve posted so far really lacks enough context to see what’s going on. |
|
|
The plugin is based on the “Boilerplate Framework” for WordPress Plugins. The constants are defined in the main plugin file (https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/blob/master/plugin-name/plugin-name.php), which are global for the whole plugin. The $this->loader->add_action method is a standard construct of that “Boilerplate Framework”, too. |
OK thanks for the clarification. I loaded up the little example template pack plugin that can be copied from the /tests/mocks/addons and got the same errors. So one of the developers made a fix, which is currently up for review in this pull request: https://github.com/eventespresso/event-espresso-core/pull/782 You’re welcome to try the branch out to see if it fixes things for you. |
|
|
Oh, yeah! Just tried the bugfix by @nerrad and it works. Thanks for that quick resolution. That’s what I call a great support team. |
The support post ‘Message template pack issues’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.