Skip to content

Push new template depending on new layout #41

@webkp

Description

@webkp

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!

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions