Error Logging In Related To Template Design

I made some changes to a custom invoice template, and it immediately caused the application to act strange, I logged out and attempted to log back in, attempting to log back in results in this error

Error :: '[id, gl9avmeG1v, name, Redacted Template Name, is_custom, true, is_active, true...' to 'minified:cU' failed due to: Deserializing '[header, <!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled...' to 'minified:F<String, String>' failed due to: Invalid argument(s): null key

I’m not finding anything useful in the Laravel log, obviously tried some basic steps like rebooting the server, I tried looking to see if I could find the template file to check for obvious issues in it but no dice in finding it, if anyone has other troubleshooting steps I can try, if anyone’s encountered this before and has a solution, open to all of it.

Hi,

Thanks for reporting this! I think you should be able to workaround it by manually clearing the custom design in the database.

cc @david @ben

@derian00

Did you edit the record from within the app, or did you modify the database table directly?

If you can provide some additional information into how you got into this state, we can look into it further.

I edited from within the app, lemme attach some output from the database:

id: blank
user_id: 1
company_id: 10.8.20.45 (this appears to be an IP from our client side scope, likely was the IP of the computer that did the initial client web portal setup)
is_custom: 1
is_active: 1
design:

{"header":"<!doctype html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>Untitled Document<\/title>\n<link href=\"Untitled-1.css\" rel=\"stylesheet\" type=\"text\/css\">\n<\/head>\n\n<body>\n<div id=\"header\">\n<img id=\"logo\" src=\"$logo\">\n<div id=\"company\">\n    <div class=\"header_margin_left header_tops\"><strong>REDACTED<\/strong><\/div>\n    <div class=\"header_margin_left\">$company.website<\/div>\n    <div class=\"header_margin_left\">$company.email<\/div>\n    <div class=\"header_margin_left\">$company.phone<\/div>\n    <br>\n    <div class=\"header_margin_left\"><p>HST: $company.vat_number<\/p><\/div>\n<\/div>\n<div id =\"client_info\">\n    <div class=\"header_margin_left header_tops\"><strong>$contact.full_name<\/strong><\/div>\n    <div class=\"header_margin_left\">$contact.email<\/div>\n    <div class=\"header_margin_left\">$contact.phone<\/div>\n    <br>\n    <div class=\"header_margin_left\"><strong>$client.name<\/strong><\/div>\n    <div class=\"header_margin_left\">$address1 - $address2<\/div>\n    <div class=\"header_margin_left\">$city_state_postal<\/div>\n    <div class=\"header_margin_left\">$country<\/div>\n<\/div>\n<div id=\"misc_info\">\n    <div class=\"header_margin_left header_tops\"><p><strong>Invoice Date:<\/strong> $invoice.date<\/p><\/div>\n    <div class=\"header_margin_left border_right\"><p><strong>Due Date:<\/strong> $due_date<\/p><\/div>\n    <br>\n    <div class=\"header_margin_left border_right\"><p><strong>Invoice Number:<\/strong> $invoice.number<\/p><\/div>\n    <div class=\"header_margin_left border_right\"><p><strong>PO Number:<\/strong> $invoice.po_number<\/p><\/div>\n    <div class=\"header_margin_left border_right\"><p><strong>Project Number:<\/strong> $project.number<\/p><\/div>\n    <div class=\"header_margin_left border_right header_bottoms\"><p><strong>Account Number:<\/strong> $account.number<\/p><\/div>\n<\/div>\n<div id=\"entity_header\"><h1>$entity<\/h1><\/div>\n<div id=\"project\"><div class=\"header_margin_left\"><strong>Notes:<\/strong> $project.name<\/div><\/div>\n<div>\n    <table>\n    <tr>\n        <th class=\"col_right col1\">R\/L\/S<\/th>\n        <th class=\"col_right col2\">Line<\/th>\n        <th class=\"col_right col3\">Description<\/th>\n        <th class=\"col_right col4\">Dept<\/th>\n        <th class=\"col_right col5\">Qty<\/th>\n        <th class=\"col_right col6\">Unit<\/th>\n        <th class=\"col7\">Extended<\/th>\n        <\/tr>\n    <\/table>\n    <\/div>    \n<\/div>\n<\/body>      \n<\/html>","body":null,"footer":"","product":"","task":"","includes":"<style id=\"style\">\n\nbody {\n    font-family: Arial, Helvetica, sans-serif;\n    font-size: \"$font_size\";\n    zoom: 80%;\n}\nh1 {\n    margin: 0;\n    padding: 0;\n}\np {\n    margin: 0;\n    padding: 0;\n}\n\n#header {\n    display: grid;\n    grid-template-columns: 20% 22.5% 1fr 1fr;\n    grid-template-rows: auto auto auto;\n    place-items: start \/ start;\n}\n\n#company {\n    grid-area: 1 \/ 2 \/ 2 \/ 3;\n    width: 100%;\n    height: 100%;\n    border: 1px black solid;\n    border-right: 0px;\n}\n#client_info {\n    grid-area: 1 \/ 3 \/ 2 \/ 4;\n    width: 100%;\n    height: 100%;\n    align-self: start;\n    border: 1px black solid;\n    border-right: 0px;\n}\n#misc_info {\n    grid-area: 1 \/ 4 \/ 2 \/ 5;\n    width: 100%;\n    height: 100%;\n    border: 1px black solid;\n\n}\n#logo {\n    grid-area: 1 \/ 1 \/ 2 \/ 2;\n    height: 100px;\n    border: 1px solid black;\n    border-right: 0px;\n}\n#entity_header {\n   grid-area: 1 \/ 1 \/ 2 \/ 2;\n    align-self: end;\n    border: 1px solid black;\n    border-right: 0px;\n}\n#project {\n    border: 1px solid black;\n    grid-column-start: 1;\n    grid-column-end: 5;\n    width: 100%;\n    padding: 7.5px 0px 7.5px 0px;\n    margin-top: 15px;\n}\n\ntable {\n    border: 1px solid black;\n    margin-top: 25px;\n}\n\n.col_right {\n    border-right: 1px solid black;\n}\n\n.header_margin_left {\n    padding-left: 5px;\n}\n.header_tops {\n    padding-top: 3px;\n}\n.header_bottoms {\n    padding-bottom: 3px;\n}\n.border_right {\n    padding-top: 2.5px;\n    padding-bottom: 2.5px;\n}\n\n<\/style>"}

is_deleted: 0

then just the created and updated dates, if there’s any other info I can provide to better assist in ensuring this doesn’t happen in future let me know, in the meantime, deleting the custom design row from the designs table has cleared the issue.

Thanks, it looks like the backend is returning "body":null which is causing the problem.

Thanks, i’ll catch null the body and return a blank string.