VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: roman5527 on July 07, 2022, 20:14:22 PM

Title: Related Products error
Post by: roman5527 on July 07, 2022, 20:14:22 PM
Hi, in product admin i dont find Related Products. I see error with custom field editor in console.
you can see video : https://www.awesomescreenshot.com/video/9855865?key=0c31943d1b916b16ceba2bbe59dbd2cb (https://www.awesomescreenshot.com/video/9855865?key=0c31943d1b916b16ceba2bbe59dbd2cb)

can you help me fix it ? thanks
Title: Re: Related Products error
Post by: Jumbo! on July 08, 2022, 07:48:18 AM
Which version of VirtueMart are you using?
Title: Re: Related Products error
Post by: roman5527 on July 08, 2022, 08:09:53 AM
Hi, sorry i forgot writte it.
I have J4.1.5 and VM4.0.6
Title: Re: Related Products error
Post by: Milbo on July 08, 2022, 11:22:00 AM
works for me. You may post your console output here
Title: Re: Related Products error
Post by: roman5527 on July 08, 2022, 20:41:26 PM
Hi, error is : Failed to load resource: net::ERR_NAME_NOT_RESOLVED and url : https://%20creates%20a%20new%20editor%20instancetinymce.execcommand%28%22mceaddcontrol%22%2Ctrue%2C%22field-1-customfield_value%22%29/?vmver=51159d6e
Title: Re: Related Products error
Post by: roman5527 on July 21, 2022, 16:36:42 PM
Hi, any idea why it dont work ?

now i dont see any error in console but it dont work.

thanks
Title: Re: Related Products error
Post by: micropalla on July 28, 2022, 08:43:23 AM
So the same for me with J 4.1.5 and VM 4.0.6.

The console says:

Uncaught TypeError: r.getClientRects is not a function
    at S.fn.init.offset (jquery.min.js?3.6.0:2:86001)
    at Object.getWithinInfo (jquery-ui.min.js?vmver=1.9.2:6:14830)
    at e.fn.position (jquery-ui.min.js?vmver=1.9.2:6:15101)
    at e.fn.position (jquery-ui.min.js?vmver=1.9.2:6:19849)
    at t.<computed>.<computed>._suggest (jquery-ui.min.js?vmver=1.9.2:6:104432)
    at t.<computed>.<computed>._suggest (jquery-ui.min.js?vmver=1.9.2:6:5368)
    at t.<computed>.<computed>.__response (jquery-ui.min.js?vmver=1.9.2:6:103735)
    at t.<computed>.<computed>.__response (jquery-ui.min.js?vmver=1.9.2:6:5368)
    at t.<computed>.<computed>.n (jquery-ui.min.js?vmver=1.9.2:6:5252)
    at t.<computed>.<computed>.__response (jquery-ui.min.js?vmver=1.9.2:6:105916)
offset @ jquery.min.js?3.6.0:2
getWithinInfo @ jquery-ui.min.js?vmver=1.9.2:6
e.fn.position @ jquery-ui.min.js?vmver=1.9.2:6
e.fn.position @ jquery-ui.min.js?vmver=1.9.2:6
_suggest @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
__response @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
n @ jquery-ui.min.js?vmver=1.9.2:6
__response @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
success @ jquery-ui.min.js?vmver=1.9.2:6
c @ jquery.min.js?3.6.0:2
fireWith @ jquery.min.js?3.6.0:2
l @ jquery.min.js?3.6.0:2
(anonimo) @ jquery.min.js?3.6.0:2
load (asinc)
send @ jquery.min.js?3.6.0:2
ajax @ jquery.min.js?3.6.0:2
e.isArray.options.source.source @ jquery-ui.min.js?vmver=1.9.2:6
_search @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
search @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
i @ jquery-ui.min.js?vmver=1.9.2:6
setTimeout (asinc)
_delay @ jquery-ui.min.js?vmver=1.9.2:6
_searchTimeout @ jquery-ui.min.js?vmver=1.9.2:6
(anonimo) @ jquery-ui.min.js?vmver=1.9.2:6
input @ jquery-ui.min.js?vmver=1.9.2:6
h @ jquery-ui.min.js?vmver=1.9.2:6
dispatch @ jquery.min.js?3.6.0:2
v.handle @ jquery.min.js?3.6.0:2

Title: Re: Related Products error
Post by: Alexb65 on December 01, 2022, 14:01:29 PM
The problem still exists in VM 4.0.8 Joomla 4.2.5

Has anyone a fix for that?

Addictionally the box that should diplay the related category/products has offset partially out of main product area and hides behind the admin menu bar
Title: Re: Related Products error
Post by: niosme on December 01, 2022, 14:22:35 PM
Look at this post https://forum.virtuemart.net/index.php?topic=148808
I think this is your problem and the solution is not yet included in virtuemart. It runs latest jquery with not the latest jquery.ui library.
jquery.min.js?3.6.0 with jquery-ui.min.js?vmver=1.9.2 are not compatible.

Let us know if it fixed your problem.
Title: Re: Related Products error
Post by: Alexb65 on December 01, 2022, 14:24:29 PM
I've temporary fixed the positionig of the related products and related categories adding the following to admin.styles.css

#ui-id-3 {
        left:522px;
        top:360px;
}
#ui-id-2 {
        left:522px;
        top:360px;
}

This is just a workaround for my specific setup so it may require different left/top values for different displays sizes
Title: Re: Related Products error
Post by: Studio 42 on December 01, 2022, 14:26:43 PM
Are your sure, it's a Virtuemart problem .
getClientRects is not a function is related to Jquery.ui
Try to clean your browser cache, you have perhaps an old Jquery.ui loaded
Or check directly the version
jQuery UI - v1.9.2
If you have Jquery 3.0 loaded you need jQuery UI 1.12.0 or +
Title: Re: Related Products error
Post by: Alexb65 on December 01, 2022, 14:32:20 PM
Quote from: niosme on December 01, 2022, 14:22:35 PM
Look at this post https://forum.virtuemart.net/index.php?topic=148808
I think this is your problem and the solution is not yet included in virtuemart. It runs latest jquery with not the latest jquery.ui library.
jquery.min.js?3.6.0 with jquery-ui.min.js?vmver=1.9.2 are not compatible.

Let us know if it fixed your problem.

Nice shot thank you

It seems to work ok now

My previous post is now useless and I're removed it from the admin.styles file

Thank you
Title: Re: Related Products error
Post by: niosme on December 01, 2022, 15:31:13 PM
Happy to here that. :)
Maybe it will be better to be fixed in official releases also cause in every virtuemart update this problem will happen again.
Title: Re: Related Products error
Post by: Milbo on December 02, 2022, 21:22:38 PM
GJC found a fix for that, add to default-white-blue.css just

.ui-widget-content {
    top: 30%;
    left: 30%;
}


Similar fix like Alex, but should work better.
Title: Re: Related Products error
Post by: Milbo on December 02, 2022, 22:14:40 PM
And Henrik sent me this one

From:

.ui-autocomplete {
    top: 100%;
    left: 0;
}

To:

.ui-autocomplete {
    top: 50%;
    left: 300px;
}

I tend to the second one.