Javascript error while expanding product categories on Prestashop 1.6 backoffice - prestashop

I have a Prestashop 1.6.1.14 shop and at the backoffice when I'm adding a new product and I try to expand all the categories available to associate with the new product I get this error:
VM837:33 Uncaught TypeError: Cannot read property 'parent' of null
at organizeTree (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:33:32)
at Object.eval [as success] (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:195:6)
at j (jquery-1.11.0.min.js:2)
at Object.fireWith [as resolveWith] (jquery-1.11.0.min.js:2)
at x (jquery-1.11.0.min.js:4)
at XMLHttpRequest.b (jquery-1.11.0.min.js:4)
Any ideas on how to solve it?

Try to disables non Prestashop modules in
Advanced Preferences > Performances
and refresh your cache, see if issue comes from external plugins

Related

Cant edit Odoo website, i get UncaughtPromiseError > OwlError

Can someone help me with the following...
When i want to edit the website of odoo it keeps loading... when i use the pencil next to a menu item and try to edit it, i get the following errors
`UncaughtPromiseError > OwlError Uncaught Promise > An error occured
in the owl lifecycle (see this Error's "cause" property) OwlError: An
error occured in the owl lifecycle (see this Error's "cause" property)
OwlError#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1098:1
handleError#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1105:101
handleError#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1931:29
complete#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1343:37
processFiber#https://example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1907:43
flush/this.frame</<#https://example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1903:109
flush/this.frame<#https://example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1903:87
Caused by: TypeError: can't access property "body",
this.website.pageDocument is null
setup/<#https://odoo.example.net/web/assets/285-63ebd6b/web.assets_backend.min.js:13355:672
useEffect/<#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1939:145
complete#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1341:196
processFiber#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1907:43
flush/this.frame</<#https://example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1903:109
flush/this.frame<#https://odoo.example.net/web/assets/251-7c5bc10/web.assets_common.min.js:1903:87
`
I have replaced my real domain with example.net for privacy
I have tried to regenerate assets in developer mode under tools hoping this would solve it...

Angular7 + XHook gives ERROR TypeError: Illegal invocation

I have a chrome plugin runnin Xhook which intercepts xhr requests.
This used to work with angular js. Now I am using an Angular 7 application And I am getting an error when I make following request
this.http.get('someurl').subscribe((data: any) => {
});
Which triggers xhr.send(reqBody); in the angular http.js library. The error is on the subscribe part, if I remove this the error is gone.
The error is the following:
core.js:15724 ERROR TypeError: Illegal invocation
at ZoneTask.scheduleTask [as scheduleFn] (zone.js:3238)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask (zone.js:410)
at Object.onScheduleTask (zone.js:301)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask (zone.js:404)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask (zone.js:238)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask (zone.js:261)
at scheduleMacroTaskWithCurrentZone (zone.js:1245)
at zone.js:3276
at _global.<computed>.proto.<computed> [as send] (zone.js:1569)
at Observable._subscribe (http.js:1726)
I am using this library: https://github.com/jpillora/xhook and the error is caused by line 478 facade.send = function(body) https://github.com/jpillora/xhook/blob/gh-pages/dist/xhook.js
I am thinking that: either angular tries to run the overridden function but something is not accessible because of zone.js, or I am missing certain properties, function in the object that overrides xhr?
If anyone has any information or solution on the subject that would be dearly appreciated.

polymer init: Trying to copy from a source that does not exist

I am trying to follow this simple guide https://www.polymer-project.org/3.0/docs/tools/create-element-polymer-cli
I pasted bellow the whole exception:
C:\dev\polymer2\sample\my-el>polymer init
'uname' is not recognized as an internal or external command,
operable program or batch file.
? Which starter template would you like to use? polymer-3-element
info: [init] Running template polymer-3-element...
? Element name my-el
? Brief description of the element test
error: [cli.main] Uncaught exception: AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist
: C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\templates\element\polymer-3.x\.gitignore
error: [cli.main] AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\myuser\
AppData\Roaming\npm\node_modules\polymer-cli\templates\element\polymer-3.x\.gitignore
at EditionInterface.exports.copy (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\mem-fs
-editor\lib\actions\copy.js:47:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node
_modules\mem-fs-editor\lib\actions\copy-tpl.js:10:8)
at Polymer3ElementGenerator.writing (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\lib\init\element
\element.js:124:21)
at Object.<anonymous> (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\yeoman-generator\
lib\index.js:417:23)
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\run-async\index.js:25:25
at new Promise (<anonymous>)
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\run-async\index.js:24:19
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\yeoman-generator\lib\index.js:418:9
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)

Odoo POS receipt error

I'm using Odoo v11 in windows localhost and I'm still beginner.
Recently, i tried to edit posticket and suddenly, the point of sale module stops loading it keep blank page.
I have cleared cache for browser and restart odoo service, it worked.
But, the receipt not showing and error message appears as showing below:
Uncaught TypeError: Cannot read property 'vat_label' of null
http://localhost:8069/point_of_sale/static/src/js/models.js:2121
Traceback:
TypeError: Cannot read property 'vat_label' of null
at child.export_for_printing
(http://localhost:8069/point_of_sale/static/src/js/models.js:2121:44)
at Class.get_receipt_render_env
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1538:28)
at Class.render_receipt
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1616:77)
at Class.show
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1505:14)
at Class.prototype.(anonymous function) [as show]
(http://localhost:8069/web/static/src/js/core/class.js:90:38)
at Class.show_screen
(http://localhost:8069/point_of_sale/static/src/js/gui.js:116:33)
at Class.finalize_validation
(http://localhost:8069/point_of_sale/static/src/js/screens.js:2071:22)
at Class.validate_order [as _super]
(http://localhost:8069/point_of_sale/static/src/js/screens.js:2080:18)
at Class.validate_order
(http://localhost:8069/pos_mercury/static/src/js/pos_mercury.js:687:14)
at Class.validate_order
(http://localhost:8069/web/static/src/js/core/class.js:123:38)
Edit :
I have removed all HTML codes i inserted to posticket, now it only working when i activate developer mode with assets. When deactivate and try generate pos sale receipt it gives this error:
Uncaught TypeError: Cannot read property 'vat_label' of null
http://localhost:4883/web/content/2266-abace1e/point_of_sale.assets.js:197
Traceback:
TypeError: Cannot read property 'vat_label' of null
at child.export_for_printing (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:197:863)
at Class.get_receipt_render_env (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:1110)
at Class.render_receipt (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:2226)
at Class.show (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:409)
at Class.prototype.(anonymous function) [as show]
(http://localhost:4883/web/content/2189-
2963aaa/web.assets_common.js:3816:488)
at Class.show_screen (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:314:48)
at Class.finalize_validation (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:400:1111)
at Class.validate_order [as _super] (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:400:1226)
at Class.validate_order (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:448:6)
at Class.validate_order (http://localhost:4883/web/content/2189-
2963aaa/web.assets_common.js:3819:371)
I really appreciate your help and support.
Regards,
It turns out that <t t-esc="widget.pos.company.name"/> in posticket is returning that invalid values from modles.js at vat_label: company.country.vat_label,.
Unfortunately, I have removed those two lines and everything works fine now.
I keep investigating on this and i will keep you updated.
Thanks for your support and assistance.
Regards,
Mhdbtashi
It happened to me last night after I delete country data from my company in the settings page. But when I put my country back to my company set-up. it works again. Not sure if this can help. I'm a non-tech person.
this error is related to the country and the field called Tax IVA name, and your company need established by default some country.

How to upload towerjs assets to S3?

What is the right way to upload production assets to S3 in towerjs?
I have my S3 credentials configured in config/credentials.coffee
Then I try cake assets:publish
and get
/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15
client = knox.createClient(Tower.secrets.s3);
^
TypeError: Cannot read property 's3' of undefined
at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15:45)
at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
at Object.action (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:9:12)
at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:67:21)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
UPDATE: I figured out that the right line in the task assets:upload:s3 should look
client = knox.createClient Tower.config.credentials.s3
But then I get another error
/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112
_console.debug("Uploading to " + Tower.secrets.s3.bucket);
^
TypeError: Cannot read property 's3' of undefined
at Object.Tower.Application.Assets.upload (/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112:51)
at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:16:37)
Seems like Tower.secrets.s3.bucket hardcoded somewhere else.
Thanks,
Andrei
I would hang tight, watch the development branch closely or even start contributing to its requirements as outlined in the Readme: https://github.com/viatropos/tower/tree/development
They're finally at a "feature complete" stage with the development branch and are now working on shoring it up so that bugs are resolved and performance improves.
Be sure to watch daily the quickly changing roadmap: https://github.com/viatropos/tower/blob/master/ROADMAP.md
Moving at a rather impressive rate given the limited number of developers! We need to throw our weight behind this project.