Announcement

Collapse
No announcement yet.

Ошибка в обновлении EspoCRM-upgrade-4.8.4-to-5.0.5

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ошибка в обновлении EspoCRM-upgrade-4.8.4-to-5.0.5

    Здраствуйте, после обновления:
    EspoCRM-upgrade-4.8.4-to-5.0.5.zip


    Была ошибка вот такого плана:

    [2018-02-15 09:00:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/admin/web/crm.********/public_html/application/Espo/Core/Utils/Database/Orm/Converter.php","line":278,"context":{"entityName": "Template","entityMetadata":{"entity":true,"layout s":false,"tab":true,"acl":"recordAllTeamNo","custo mizable":true,"disabled":false,"defaultTemplates": {"Quote":{"header":"<table class="table table-bordered" style="line-height: 1.36; background-color: rgb(255, 255, 255);">\n<tbody>\n<tr>\n<td width="50%"><p><span style="font-size: 18px;">Company Name</span></p>\n<p><span style="font-size: 12px;">{{accountName}}</span><br><span style="font-size: 12px;">{{{billingAddressStreet}}}</span><br><span style="font-size: 12px;">{{billingAddressCity}}{{#if billingAddressState}},{{/if}} {{billingAddressState}} {{billingAddressPostalCode}}</span><br><span style="font-size: 12px;">{{billingAddressCountry}}<br></span><span style="font-size: 18px;"><br></span></p>\n</td>\n<td width="50%"><p style="text-align: right; "><span style="color: rgb(156, 156, 148); font-size: 18px; line-height: 24.4799995422363px;">Quote</span></p>\n<p></p>\n<div style="text-align: right;"><span style="font-size: 12px; line-height: 24.4799995422363px; color: rgb(0, 0, 0);">Date: {{dateQuoted}}</span></div>\n<br><p></p>\n</td>\n</tr>\n</tbody>\n</table>\n<p><span style="font-size: 18px; line-height: 32.6399993896484px;">{{name}}</span></p>\n<p><span style="font-size: 18px; line-height: 32.6399993896484px;"><br></span></p>","body":"<p>Currency: {{amountCurrency}}</p>\n\n <table border="0.5pt" cellpadding="2" class="table table-bordered">\n<tbody>\n <tr>\n <th width="5%" align="left">#</th>\n <th width="37%" align="left">Name</th>\n <th width="8%" align="left">Qty</th>\n <th width="16%" align="left">List Price</th>\n <th width="16%" align="left">Unit Price</th>\n <th width="16%">Amount</th>\n </tr>\n <!-- {{#each itemList}} --> <tr>\n <td>{{order}}</td>\n <td>{{name}}</td>\n <td>{{quantity}}</td>\n <td align="right">{{listPrice}}</td>\n <td align="right">{{unitPrice}}</td>\n <td align="right">{{amount}}</td>\n </tr>\n<!-- {{#if description}} -->\n<tr><td colspan="7">{{{description}}}</td></tr>\n<!-- {{/if}} -->\n<!-- {{/each}} --> <tr>\n <td colspan="7"></td>\n </tr>\n <tr>\n <td colspan="5" align="right">Pre-Discounted Amount</td>\n <td align="right">{{preDiscountedAmount}}</td>\n </tr>\n <tr>\n <td colspan="5" align="right">Discount Amount</td>\n <td align="right">{{discountAmount}}</td>\n </tr>\n <tr>\n <td colspan="5" align="right">Amount</td>\n <td align="right">{{amount}}</td>\n </tr>\n <tr>\n <td colspan="5" align="right">Tax Amount</td>\n <td align="right">{{taxAmount}}</td>\n </tr>\n <tr>\n <td colspan="5" align="right">Shipping Cost</td>\n <td align="right">{{shippingCost}}</td>\n </tr>\n <tr>\n <td colspan="5" align="right">Grand Total Amount</td>\n <td align="right"><b>{{grandTotalAmount}}</b></td>\n </tr>\n</tbody>\n</table>\n<p><br></p>\n<p align="center">Thank you for your business.</p>","footer":"<div style="text-align: center;"><span style="font-size: 10px;">{pageNumber}</span></div>"}}},"unmergedFields":["name"],"outputMeta":{"id":{"type":"id","dbType":"varchar "},"name":{"type":"varchar","notStorable":true},"d eleted":{"type":"bool","default":false}}}} []

    Исправил приведя файл: /application/Espo/Resources/metadata/entityDefs/Template.json
    Было вот так:
    {
    "entity": true,
    "layouts": false,
    "tab": true,
    "acl": "recordAllTeamNo",
    "customizable": true,
    "disabled": false
    }


    К следующему виду:

    {
    "fields": {
    "name": {
    "type": "varchar",
    "required": true,
    "trim": true
    },
    "body": {
    "type": "text",
    "view": "views/fields/wysiwyg"
    },
    "header": {
    "type": "text",
    "view": "views/fields/wysiwyg"
    },
    "footer": {
    "type": "text",
    "view": "views/fields/wysiwyg",
    "tooltip": true
    },
    "entityType": {
    "type": "enum",
    "required": true,
    "translation": "Global.scopeNames",
    "view": "views/fields/entity-type"
    },
    "leftMargin": {
    "type": "float",
    "default": 10
    },
    "rightMargin": {
    "type": "float",
    "default": 10
    },
    "topMargin": {
    "type": "float",
    "default": 10
    },
    "bottomMargin": {
    "type": "float",
    "default": 25
    },
    "printFooter": {
    "type": "bool"
    },
    "footerPosition": {
    "type": "float",
    "default": 15
    },
    "teams": {
    "type": "linkMultiple"
    },
    "createdAt": {
    "type": "datetime",
    "readOnly": true
    },
    "modifiedAt": {
    "type": "datetime",
    "readOnly": true
    },
    "createdBy": {
    "type": "link",
    "readOnly": true
    },
    "modifiedBy": {
    "type": "link",
    "readOnly": true
    },
    "variables": {
    "type": "base",
    "notStorable": true,
    "tooltip": true
    }
    },
    "links": {
    "teams": {
    "type": "hasMany",
    "entity": "Team",
    "relationName": "entityTeam"
    },
    "createdBy": {
    "type": "belongsTo",
    "entity": "User"
    },
    "modifiedBy": {
    "type": "belongsTo",
    "entity": "User"
    }
    },
    "collection": {
    "sortBy": "name",
    "asc": true
    }
    }

    И все стало хорошо)

  • #2
    Thanks

    Comment

    Working...
    X