Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push new template depending on new layout #41

Closed
webkp opened this issue Jan 28, 2021 · 2 comments · Fixed by #81
Closed

Push new template depending on new layout #41

webkp opened this issue Jan 28, 2021 · 2 comments · Fixed by #81
Assignees
Labels
bug Something isn't working

Comments

@webkp
Copy link

webkp commented Jan 28, 2021

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!
@derekrushforth derekrushforth self-assigned this Jan 28, 2021
@derekrushforth derekrushforth added the bug Something isn't working label Jan 28, 2021
@derekrushforth
Copy link
Contributor

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.

@gaetan-wap
Copy link

Hi.
Are there any updates one this side ?

tomek-ac added a commit that referenced this issue Aug 17, 2023
tomek-ac added a commit that referenced this issue Aug 17, 2023
tomek-ac added a commit that referenced this issue Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants