PDF templates disappear

Hello again, congratulations for the work done. Since the last time I tried v5, I have noticed a lot of work to make it work perfectly.

I would like to switch to v5 now, from my v4 white label, but I have noticed a strange thing with the invoice, quote and credit PDF templates.

As soon as I have my installation migrated using Docker, the first day everything OK. I thought it was a fault of mine, or of the migration itself. The fact is that, when my server shuts down at night, the next morning when it starts up, there is no trace of any template, it is all empty.

What’s going on?

Thanks for your help and effort.

Hi,

I’m not sure I understand, are only the custom designs lost?

Are all.

I create a modified one the day before, working correctly.

Next day, everything is empty, I can’t choose any.

  • Do you see your design in the database table?

  • If you add the design, then click “Refresh Data” on Settings > Device Settings does the problem appear immediately?

How can i do this from docker?

At fresh install and migration, i can do my custom design and view all the others whitout any problem.
Now. I can’t select any. The field where i select it’s empty.

I’m not sure, if you can provide steps to replicate the problem it would be helpful.

In which table are the designs stored?

I’m not familiar with the v5 table structure but I would assume it has “design” in its name

In the table ‘designs’ I also see, together with the others, my modified one.

 show tables;

±------------------------------+
| Tables_in_ninja |
±------------------------------+
| accounts |
| activities |
| backups |
| bank_companies |
| bank_subcompanies |
| banks |
| client_contacts |
| client_gateway_tokens |
| clients |
| companies |
| company_gateways |
| company_ledgers |
| company_tokens |
| company_user |
| countries |
| credit_invitations |
| credits |
| currencies |
| date_formats |
| datetime_formats |
| designs |
| documents |
| expense_categories |
| expenses |
| failed_jobs |
| gateway_types |
| gateways |
| group_settings |
| industries |
| invoice_invitations |
| invoices |
| jobs |
| languages |
| migrations |
| password_resets |
| payment_hashes |
| payment_libraries |
| payment_terms |
| payment_types |
| paymentables |
| payments |
| products |
| projects |
| quote_invitations |
| quotes |
| recurring_invoice_invitations |
| recurring_invoices |
| recurring_quotes |
| sizes |
| system_logs |
| task_statuses |
| tasks |
| tax_rates |
| timezones |
| users |
| vendor_contacts |
| vendors |
| webhooks |
±------------------------------+

select * from designs;

| 0 | 2021-03-07 09:53:09.166872 | 2021-03-07 09:53:10.002841 | NULL |
| 10 | 1 | 2 | Payful Modificado | 1 | 1 | {“header”:"<div id=“header”>\n <div style=“background-color: #a9d0f5”></div>\n <div style="background-color:

This is a part of the table.

@david do you have any ideas?

@ben should have more info on this on.

Can you check the network tab in your browser & monitor the requests after you save the design? Also, can you please check the laravel.log file (storage/logs/laravel.log) to see if there are any helpful messages logged?

Deserializing '[data, {id: JX7ax9byv4, name: nuevo2, is_custom: true, is_active: true, desig...' to 'minified:x4' failed due to: Deserializing '[id, JX7ax9byv4, name, nuevo2, is_custom, true, is_active, true, design, {hea...' to 'minified:cR' failed due to: Deserializing '[footer, , product, , task, , includes, , null, null, null, null]' to 'minified:E<String, String>' failed due to: Invalid argument(s): null key

Deserializing '[data, {id: JX7ax9byv4, name: nuevo2, is_custom: true, is_active: true, desig...' to 'minified:x4' failed due to: Deserializing '[id, JX7ax9byv4, name, nuevo2, is_custom, true, is_active, true, design, {hea...' to 'minified:cR' failed due to: Deserializing '[footer, , product, , task, , includes, , null, null, null, null]' to 'minified:E<String, String>' failed due to: Invalid argument(s): null key
    at Object.e (https://te***s.ddns.net/main.dart.js?v=5.1.14:3398:3)
    at aTO.avc (https://te***s.ddns.net/main.dart.js?v=5.1.14:73438:9)
    at aTO.m (https://te***s.ddns.net/main.dart.js?v=5.1.14:73416:8)
    at aTO.c1 (https://te***s.ddns.net/main.dart.js?v=5.1.14:73393:44)
    at https://te***s.ddns.net/main.dart.js?v=5.1.14:145386:5

When I create new one and save, this error appears.

Designs database is atacched.
Designs

Hey @hillel does this console output helps you?

I think something may not go well during the migration, although apparently I have everything right.

I have also made a check of the integrity of the database (ninja: check) and I see messages of corrections.

Maybe some bug is creeping in from the migration.

It could be related to this issue

I will try with a fresh install on 5.1.19

1 Like