Templating in v5

How does templating in v5 work?
I did not make it that far with the webinterface alone. It confused me a little that most of the html are tables with specific ids, no keyword in sight. How can i define my own tables or in general the content of the template? I even failed to locate the template files in the installation, I only found them on github but they are not defined in html like in the webinterface. Or are those v4 templates?

A little guidance, please! I want to finally switch to beautiful v5 for good!

Hi,

I believe the HTML designs are defined here:

You can use the “draft” option when editing the design with the browser console to inspect the design HTML.

Is there a way to copy the templates/settings from one company to another? I have three companies with similar settings and it would be really nice to be able to just copy from the main one and just update the small changes needed afterward. I see the settings section in the DB which appears to have all the settings, but I tried copying that and received some sort of serial error afterward (I did clear the cache also).

You can transfer all of the settings between companies using the JSON import/export option.

Thank you! You guys are the best.

I exported the settings but I am getting this when importing just settings into the other company:

Error: please check that Invoice Ninja v5 is installed on the server

I am using: v5.3.8-C58

Are there any errors in storage/logs

a couple of people have reported this, however i’ve been unable to replicate this on any of my environments.

are you using apache or nginx config?

are you using invoice invoiceninja in a subdirectory?

apache and yes I am using a sub-directory/virtual host

I checked the log today and yesterday. No errors at all.

I also got a log from Chrome that may help since there is no info in the laravel.log

js_primitives.dart:47 ## ERROR (app_middleware - load state): State does not exist on file
js_primitives.dart:47 POST: https://test.com/api/v1/refresh?&first_load=true&include_static=true
js_primitives.dart:47 POST: https://test.com/api/v1/export?
js_primitives.dart:47 POST: https://test.com/api/v1/import_json?&import_settings=true
/api/v1/import_json?&import_settings=true:1 Failed to load resource: the server responded with a status of 413 (Payload Too Large)
js_primitives.dart:47 POST: https://test.com/api/v1/import_json?&import_settings=true
js_primitives.dart:47 POST: https://test.com/api/v1/import_json?&import_settings=true
html_dart2js.dart:18586 POST https://test.com/api/v1/import_json?&import_settings=true 413 (Payload Too Large)
iK @ html_dart2js.dart:18586
dDC @ main.dart.js?v=5.3.9:4926
(anonymous) @ browser_client.dart:74
(anonymous) @ async_patch.dart:316
$2 @ async_patch.dart:341
$1 @ async_patch.dart:292
wa @ zone.dart:1613
$0 @ future_impl.dart:119
a3f @ future_impl.dart:736
ux @ future_impl.dart:542
$0 @ future_impl.dart:580
eh1 @ schedule_microtask.dart:40
elE @ schedule_microtask.dart:49
$1 @ async_patch.dart:49
euE @ js_helper.dart:1826
(anonymous) @ js_helper.dart:1858
childList (async)
$1 @ async_patch.dart:62
dM0 @ async_patch.dart:27
cWS @ zone.dart:1421
ub @ zone.dart:1633
a4u @ future_impl.dart:579
mZ @ future_impl.dart:574
fM @ future_impl.dart:240
(anonymous) @ feedback.dart:107
(anonymous) @ async_patch.dart:316
$2 @ async_patch.dart:341
R @ async_patch.dart:246
bhk @ feedback.dart:97
a8c @ ink_well.dart:988
eval @ VM19858:3
aiu @ recognizer.dart:182
jv @ recognizer.dart:168
ahI @ tap.dart:607
a56 @ tap.dart:296
ahG @ tap.dart:230
mE @ recognizer.dart:475
eval @ VM20157:3
aBl @ pointer_router.dart:93
$2 @ pointer_router.dart:138
R @ linked_hash_map.dart:205
a6e @ pointer_router.dart:136
ama @ pointer_router.dart:122
qb @ binding.dart:439
XF @ binding.dart:419
XF @ binding.dart:287
a7Q @ binding.dart:374
aXx @ binding.dart:338
Ss @ binding.dart:296
aGB @ binding.dart:279
eval @ VM19685:3
aWy @ platform_dispatcher.dart:978
aKI @ platform_dispatcher.dart:177
eval @ VM19661:3
$1 @ pointer_binding.dart:553
$1 @ pointer_binding.dart:506
$1 @ pointer_binding.dart:214
euE @ js_helper.dart:1826
(anonymous) @ js_helper.dart:1858
Show 28 more frames

This was because I had the follow php settings too small:

upload_max_size
post_max_size
max_execution_time

May not have needed to increase the last one, but definately the other two.

Ok so the import works now, but there are still some issues. I only imported settings.
When doing that it did import the invoice changes I made, but it appears that the templates I made do not show up when I push ‘customize & preview’.

So they work for now, but if I have to make changes the templates do not show up.
How can I make the templates show up?

@david any thoughts?

So just to clarify, are we saying that when importing just settings, your custom designs are not coming across?

The designs are there, but they do not show in the template editor. So I cannot edit them.

I’m not sure I understand, are you able to post a screenshot?

if you run /update?secret= does this make them visible?