spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Unlayer caches the template/content and shows it in every other view #196

Closed jonaswouters closed 4 years ago

jonaswouters commented 4 years ago

Since updating to the last version, updating any content seems to overwrite all templates and campaign content.

The content is not actually saved to the database, but it uses the same cached HTML every time unlayer is used in a view.

jonaswouters commented 4 years ago

I did some investigating, and even though the correct template gets loaded via an XHR request, the first opened template gets loaded via unlayer.loadDesign().

Disabling turbolinks on templates and campaigns fixes this issue for me for now.

                        <td class="markup-links">
                            <a data-turbolinks="false" class="break-words" href="{{ route('mailcoach.templates.edit', $template) }}">
                                {{ $template->name }}
                            </a>
                        </td>
riasvdv commented 4 years ago

Thanks for the research, I'll look into it this week!

sebastiandedeyne commented 4 years ago

Hey @jonaswouters,

Thanks for reporting and investigating! I tagged a new version of laravel-mailcoach-unlayer that fixes the Turbolinks compatibility issues.