Impex Error at referencing vm file - sap-commerce-cloud
I am trying to create impex for email page.
$contentCatalog=ShopzoneContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$jarResourceCms=jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/cockpits/cmscockpit/structure-view
$emailResource=jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails
$emailPackageName=com.shopzone.facades.process.email.context
Email velocity templates
INSERT_UPDATE RendererTemplate;code[unique=true];description[lang=en];templateScript[lang=en,translator=de.hybris.platform.commerceservices.impex.impl.FileLoaderValueTranslator];contextClass;rendererType(code)[default='velocity']
;appointment_notification_email_subject;"Appointment Notification Email Subject";$emailResource/appointment_notification_email_subject.vm;$emailPackageName.AppointmentEmailContext;
;appointment_notification_email_body;"Appointment Notification Email Body";$emailResource/appointment_notification_email_body.vm;$emailPackageName.AppointmentEmailContext;
Email page Template
INSERT_UPDATE EmailPageTemplate;$contentCV[unique=true];uid[unique=true];name;active;frontendTemplateName;subject(code);htmlTemplate(code);restrictedPageTypes(code)
;;appointmentNotificationEmailTemplate;Appointment Notification Email Template;true;appointmentNotificationEmailTemplate;appointment_notification_email_subject;appointment_notification_email_body;EmailPage
Templates for CMS Cockpit Page Edit
UPDATE EmailPageTemplate;$contentCV[unique=true];uid[unique=true];velocityTemplate[translator=de.hybris.platform.commerceservices.impex.impl.FileLoaderValueTranslator]
;;appointmentNotificationEmailTemplate;$jarResourceCms/structure_appointmentNotificationEmailTemplate.vm
Media
insert_update Media;code[unique=true];$contentCV;url;mime[default='image/jpg'];altText
;szEmailSiteLogoMedia;;/_ui/responsive/common/images/site_logo.png;;Shopzone
CMS Image Components
INSERT_UPDATE CMSImageComponent;$contentCV[unique=true];uid[unique=true];name;media(code, $contentCV)
;;szEmailSiteLogoImage;Email Site Logo Image;szEmailSiteLogoMedia
Content Slots
UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];cmsComponents(uid,$contentCV)
;;szEmailSiteLogoSlot;szEmailSiteLogoImage
Bind Content Slots to Email Page Templates
INSERT_UPDATE ContentSlotForTemplate;$contentCV[unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,$contentCV)[unique=true];contentSlot(uid,$contentCV)[unique=true];allowOverwrite
;;siteLogo-appointmentNotificationEmailTemplate;szSiteLogo;appointmentNotificationEmailTemplate;szEmailSiteLogoSlot;true
Email Page
INSERT_UPDATE EmailPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);defaultPage;approvalStatus(code)[default='approved'];fromEmail[lang=en];fromName[lang=en]
;;appointmentNotificationEmailPage;Appointment Notification Email;appointmentNotificationEmailTemplate;true;;estore#shopzone.com;Customer Services Team
ERROR :
INSERT_UPDATE RendererTemplate;code[unique=true];description[lang=en];templateScript[lang=en,translator=de.hybris.platform.commerceservices.impex.impl.FileLoaderValueTranslator];contextClass;rendererType(code)[default='velocity']
,8796125836191,,, column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_body.vm' for attribute 'templateScript', column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_body.vm' for attribute 'templateScript';appointment_notification_email_body;Appointment Notification Email Body;jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_body.vm;com.shopzone.facades.process.email.context.AppointmentEmailContext;
,8796125868959,,, column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_subject.vm' for attribute 'templateScript', column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_subject.vm' for attribute 'templateScript';appointment_notification_email_subject;Appointment Notification Email Subject;jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/emails/appointment_notification_email_subject.vm;com.shopzone.facades.process.email.context.AppointmentEmailContext;
UPDATE EmailPageTemplate;catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged][unique=true];uid[unique=true];velocityTemplate[translator=de.hybris.platform.commerceservices.impex.impl.FileLoaderValueTranslator]
,8796420736052,,, column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/cockpits/cmscockpit/structure-view/structure_appointmentNotificationEmailTemplate.vm' for attribute 'velocityTemplate', column 3: cannot resolve value 'jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/cockpits/cmscockpit/structure-view/structure_appointmentNotificationEmailTemplate.vm' for attribute 'velocityTemplate';;appointmentNotificationEmailTemplate;jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/resources/shopzonecore/import/cockpits/cmscockpit/structure-view/structure_appointmentNotificationEmailTemplate.vm
UPDATE ContentSlot;catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged][unique=true];uid[unique=true];cmsComponents(uid,catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged])
,,,no existing item found for update;;szEmailSiteLogoSlot;szEmailSiteLogoImage
INSERT_UPDATE ContentSlotForTemplate;catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged][unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged])[unique=true];contentSlot(uid,catalogVersion(CatalogVersion.catalog(Catalog.id[default=ShopzoneContentCatalog]),CatalogVersion.version[default=Staged])[default=ShopzoneContentCatalog:Staged])[unique=true];allowOverwrite
,,,error finding existing item : column='contentSlot' value='szEmailSiteLogoSlot', , column 5: could not resolve item for szEmailSiteLogoSlot;;siteLogo-appointmentNotificationEmailTemplate;szSiteLogo;appointmentNotificationEmailTemplate;szEmailSiteLogoSlot;true
02.11.2017 15:35:02: ERROR: Can not resolve any more lines ... Aborting further passes (at pass 2). Finally could not import 5 lines!
02.11.2017 15:35:02: ERROR: Can not resolve any more lines ... Aborting further passes (at pass 2). Finally could not import 5 lines!
When you reference files, you need to reference them starting with the "resources" directory as your root directory.
$jarResourceCms=jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/import/cockpits/cmscockpit/structure-view $emailResource=jar:com.shopzone.core.setup.CoreSystemSetup&/shopzonecore/import/emails
Related
Error trying to create an start automatic using "Start Virtual Machine" template
I've created a template but trying to change it or creating a new one; I receive the msg below: The template validation failed: 'The value for the workflow parameter 'EmailID' at line '1' and column '5022' is not provided.'.
In my case inserting an email on the relevant field solved the problem
Updating fiield in PostgreSQL table using .update() not working in django
I've been trying to update the invo_payment_method value from a table called Invoices. This is the code that I currently have to try to achieve this: if total_payments_for_invoice.all().count() == 1: invoice_object = Invoice.objects.get(slug=slug) invoice_object.invo_payment_method = request.POST.get('payment_method') invoice_object.save() So what I'm trying to do is if it's the first payment for the invoice I want to get invoice_object which has the slug of the invoice that just got a payment and update the invo_payment_method field in the table and save the changes. But that's not working. I also tried doing the following: if total_payments_for_invoice.all().count() == 1: Invoice.objects.filter(slug=slug).update( invo_payment_method=request.POST.get('payment_method')) And it's not working either. After that I tried adding a the following to the code above: if total_payments_for_invoice.all().count() == 1: Invoice.objects.filter(slug=slug).update( invo_payment_method=request.POST.get('payment_method')).save() And this one actually updated the value in the database, but it made the webpage crash because of the following exception: AttributeError: 'int' object has no attribute 'save'. In case more information is needed, if I print the value of Invoice.objects.get(slug=slug) I get the following: INV-bb1c 21. And if I print the value of Invoice.objects.filter(slug=slug) I get the following: <QuerySet [<Invoice: INV-bb1c 21>]>. In both cases I'm getting the invoice number which is INV-bb1c and the invoice pid which is 21. Please see image attached of how the Invoice table looks like. Any help would be greatly appreciated. To clarify: invo_payment_method is initially null in the database and request.POST.get('payment_method') returns a string of the payment method used.
Failed to add fields.Selection to parent model
I'm working on access restriction to res.partner. Currently I have two questions: 1.Why does this code don't create new field to inherited model (first error was something like "unknown object _", now it's gone): (Now it works, first question is answered) from odoo import models, fields class partner(models.Model): _inherit = 'res.partner' privacy_visibility = fields.Selection([ ('followers', _('On invitation only')), ('employees', _('Visible by all employees')), #error was here. according to odoo documentation, here is a comma #if you remove it, the code works: [![enter image description here][1]][1]([('',''),('',''),('','')]) ], string='Privacy', required=True, default='employees', help="Holds visibility of the partner that affects currently logged user:\n" "- On invitation only: Employee may only see the followed partners\n" "- Visible by all employees: Employee may see selected partner\n") Later, when my restrictions would be applied, how to make selected users to access all pertners anyway? (my ideas - 1.to hide "privacy_visibility" field to be visible in developer mode only, as it made for project's "sub-task project". 2.to create a new group, but I have no idea how to use access groups with row-level access), which way wold you recommend to go?
First Question Ans: The Selection field syntax is not correct please follow this syntax Example: gender = fields.Selection([('male', 'Male'), ('female', 'Female'), ('any', 'Any')], string='Gender')
You are calling the translate object (the underscore "_") to translate your selection values, but you did not import it. Change: from odoo import models, fields To: from odoo import models, fields, _
Domain deletion error in plesk
Guyzz, When I am trying to delete a domain from plesk(11.5_windows), I am getting an error. Pasting error below: Error: DNSZone::Table::select() failed: no such row in the table Do you ever got this error ?
Guyzz, Finally I got a solution. The reason for the error is that in psa.domains, the Plesk MySQL table dns_zone_id record points to a nonexistent ID record in the psa.dns_zone table for one or several domains. Resolution is explaining below : As a first step, delete domain which having issue from IIS then follow the steps below. Access the plesk's DB (psa), for that follow the steps below : --> cmd >> cd %plesk_dir%\mysql\bin --> type mysql.exe -u admin -p -P 8306 psa --> type plesk's password Find the domains that have missing IDs by running following query : SELECT d.name FROM domains d LEFT JOIN dns_zone z ON d.dns_zone_id=z.id WHERE z.id IS NULL; Create appropriate ID records using the following commands. Do not forget to replace <"DOMAIN-NAME"> with the real domain name and <"ADMIN-EMAIL"> with the correct email: INSERT INTO dns_zone (name, displayName, email) VALUES ('<DOMAIN-NAME>', '<DOMAIN-NAME>', '<ADMIN-EMAIL>'); Determine the new zone ID: SELECT id, name FROM dns_zone where name='<DOMAIN-NAME>'; Substitute the correct ID into the psa.domains table, remembering to replace <"DOMAIN-NAME"> and <"DNS-ZONE-ID"> with the correct values: UPDATE domains SET dns_zone_id='<DNS-ZONE-ID>' WHERE name='<DOMAIN-NAME>'; Thats it !!! Now you should able to delete the domain from plesk !!!
Error while assigning Users to an Organization: com.liferay.portal.NoSuchResourceActionException
I am getting following error while assiging users to organization using UserServiceUtil.addOrganizationUsers(orgId, userIds) ERROR [AdvancedPermissionChecker:944] com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Organization#ASSIGN_MEMBERS I guess I need to add a row in Resource Table with com.liferay.portal.model.Organization name and ASSIGN_MEMBERS in actionID. But what to insert in resourceActionId and bitwiseValue fields. or Is there any other way to get rid of this error?
fresh installation of Liferay 6.1.1 ga 2 resolved this issue for me.