Push new template depending on new layout
If a new template is uploaded together with a new layout and the template depends on the layout, the upload for the template fails, only the layout is upload on first push.
I think it would make sense to upload layouts first and then templates to avoid this behavior.
Currently you have to push several times until all layouts are uploaded and then all templates are accepted successfully.
1st push
/app # postmark templates push . -f
- Fetching templates...
2 templates
- Pushing templates to Postmark...
+-----------------------------------------------------------------------------------+
¦ Status ¦ Name ¦ Alias ¦ Layout used ¦
+--------+---------------------+--------------------------------+-------------------¦
¦ Added ¦ *********** ¦ change-request-cancel-de ¦ layout_support-de ¦
+--------+---------------------+--------------------------------+-------------------¦
¦ Added ¦ *********** ¦ change-request-cancel-en ¦ layout_support-en ¦
+--------+---------------------+--------------------------------+-------------------¦
2 layouts
+--------------------------------------------------+
¦ Status ¦ Name ¦ Alias ¦
+--------+---------------------+-------------------¦
¦ Added ¦ Layout Support (DE) ¦ layout_support-de ¦
+--------+---------------------+-------------------¦
¦ Added ¦ Layout Support (EN) ¦ layout_support-en ¦
+--------+---------------------+-------------------¦
2 templates and 2 layouts will be pushed to Postmark.
change-request-cancel-en: ApiInputError: The 'LayoutTemplate' associated with this request is not valid or was not found.
- Pushing templates to Postmark...
change-request-cancel-de: ApiInputError: The 'LayoutTemplate' associated with this request is not valid or was not found.
- Pushing templates to Postmark...
⚠️ Failed to push 2 templates. Please see the output above for more details.
✅ All finished!
/app #
2nd push:
/app # postmark templates push . -f
- Fetching templates...
2 templates
- Pushing templates to Postmark...
+-----------------------------------------------------------------------------------+
¦ Status ¦ Name ¦ Alias ¦ Layout used ¦
+--------+---------------------+--------------------------------+-------------------¦
¦ Added ¦ *********** ¦ change-request-cancel-de ¦ layout_support-de ¦
+--------+---------------------+--------------------------------+-------------------¦
¦ Added ¦ *********** ¦ change-request-cancel-en ¦ layout_support-en ¦
+--------+---------------------+--------------------------------+-------------------¦
2 templates will be pushed to Postmark.
✅ All finished!
Thank you @webkp! This is a known issue on our end. It's a little trickier so I need more time to publish a fix. I know it's not ideal, but in the meantime doing that second push will get all of the remaining templates up on the server.
Hi. Are there any updates one this side ?