Support

Home Forums Event Espresso Premium Problems with registering new Message Template Pack

Problems with registering new Message Template Pack

Posted: January 26, 2017 at 8:08 am


ARAGATO

January 26, 2017 at 8:08 am

I followed all the guidelines given by EE and registered a new Message Template Pack by modifying the template plugin from this guide:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/E–Messages-System/registering-message-template-packs.md

It worked out, but somehow I had to modify the following two lines because it caused a wrong pathing and lead to a fatal error not finding the class.

define( 'EE_NEW_TP_PATH', plugin_dir_path( __FILE__ ) . '/' );
define( 'EE_NEW_TP_URL', plugin_dir_url( __FILE__ ) . '/' );

changed to

define( 'EE_NEW_TP_PATH', plugin_dir_path( __FILE__ ));
define( 'EE_NEW_TP_URL', plugin_dir_url( __FILE__ ));

No additional forward slash at the end causing a double forward slash in either the EE_NEW_TP_PATH and the EE_NEW_TP_URL variable.

After fixing that it worked so far, but now I encountered a critical error. One of my message types is totally broken. It cannot be reset to default. I disabled the plugin, but still it does not work anymore. No receipients etc. http://uploads.aragato-server.net/screenshots/20170126582fe3c2ad.png

The message I am getting is:

An error has occurred:
Something went wrong with deleting existing templates. Unable to reset to default
Messages_Admin_Page - _reset_to_default_template - 1771

I do now know if this has anything to do with my modifications of the plugin file or if it is another error.

Please help.


Josh

  • Support Staff

January 26, 2017 at 8:33 am

There’s a ready-made example of a new message template pack that you can checkout and reverse-engineer to compare to your project:

https://github.com/joshfeck/eemtp-name-badge-template-pack


ARAGATO

January 26, 2017 at 8:38 am

Thanks for the link Josh, but that does not fix my critical error. My message type cancelled registration is totally broken and cannot be reset to default. It does not have any recepieints anymore.


Josh

  • Support Staff

January 26, 2017 at 8:46 am

Did you actually take the time and review your code? If you want someone else to review your code and fix it, then you probably should hire a developer.


ARAGATO

January 26, 2017 at 8:54 am

As I wrote, I do not even have the plugin enabled, thus it is plain vanilla EE and no custom code from me is interfering.

As shown in my linked screenshot, there are no more recipients:
http://uploads.aragato-server.net/screenshots/20170126582fe3c2ad.png
http://uploads.aragato-server.net/screenshots/20170126431789e76c.png

Everything is empty as well:
http://uploads.aragato-server.net/screenshots/20170126a10c4e9d26.png

And I cannot reset template to default. If I do I receive the following error:
http://uploads.aragato-server.net/screenshots/20170126116a09eb11.png


Josh

  • Support Staff

January 26, 2017 at 9:49 am

Was the cancelled registration message type messed up before you registered the Message Template pack?


ARAGATO

January 26, 2017 at 10:00 am

No, it must have happend sometime when I was using the new registered message pack. I worked with this message type altering some of the message templates for that message type. Everything worked so far, but then I wanted to reset to default of my new message template. It threw the error and since then it is like this. I deactivated the plugin in order to restore the EE defaults, but nothing changed.


Josh

  • Support Staff

January 26, 2017 at 10:12 am

You could try disabling the message type, then reactivating it. You go to Event Espresso > Messages > Settings. Then drag the broken message type over to the Inactive Message Types box. Then you drag it back to the box that has the active message types.


ARAGATO

January 26, 2017 at 11:48 pm

Disabling and reenabling the message type actually worked and put it back in default state including the recipients.

The support post ‘Problems with registering new Message Template Pack’ 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.

Event Espresso