News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Loading frontend child product results in empty page until page is reloaded

Started by Thomas Kampp, October 19, 2018, 15:57:08 PM

Previous topic - Next topic

Thomas Kampp

Viewing a products with child products. When choosing a child product the page reloads and goes to the child product. But the page is empty! If reloading (F5) the page the correct page is shown.

Reproduction of problem - click this link, choose different size (child product). The page is now empty. Try reloading.
https://danishcaresupply.dk/shop/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-detaljer

I have tested:

  • Switching to another template results in the same problem.
  • GZIP, caching and minify is switched off.
  • There is no error output even if switched on.

Setup:
VM: 3.4.0 (did not work on VM 3.2 either)
Joomla: 3.8.13
PHP: 7.1.20

What can the problem be?
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

Has to be your template .. the ajax retuurns the correct content -- try

https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1

but I suspect your template hasn't the correct div id to display it correctly

all that renders is the related products
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

Quote from: Jörgen on October 19, 2018, 16:51:00 PM
Have You tried with SEF off ?
Check also with Protostar.

Jörgen @ Kreativ Fotografi

It does not work with SEF off either.
It does not work with protostar (or protostar and SEF off).
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

GJC Web Design

QuoteHas to be your template .. the ajax retuurns the correct content -- try

https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1

but I suspect your template hasn't the correct div id to display it correctly

all that renders is the related products
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

Quote from: GJC Web Design on October 19, 2018, 17:06:35 PM
Has to be your template .. the ajax retuurns the correct content -- try

https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1

but I suspect your template hasn't the correct div id to display it correctly

all that renders is the related products

The child product switch does not work in the tmpl=component&format=html&dynamic=1 version either. It is the same problem as described in my first entry. Not even if the protostar template is used at the same time does it work

I think that we can rule out the template even though it is the obvious choice.
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Thomas Kampp

Quote from: Milbo on October 22, 2018, 16:04:48 PM
But this link here https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1
was loaded in my case below 1 sec.

It is not about load time. The problem is you need to click Refresh (F5) before the page with the child product is viewed. Until then it only shows "Related products".

Here is what I get: http://recordit.co/YoVla1Wcbb
It should not be necessary for the user to refresh the page manually every time.

Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

GJC Web Design

what do u mean with
QuoteThe child product switch does not work in the tmpl=component&format=html&dynamic=1 version either.
I am looking at it!

https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1

what DOESN'T happen is it isn't correctly loaded into your template with only the related products showing up until u refresh
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

Please see my video. As you can see I have to click the reload button in order for the child product view to load correctly. This problem is the same weather or not I use protostar template, yootheme/site template, SEF on or off, use the tmpl=component... code or not. It is the same result with all constellations with these settings.

Do you ned experience the same?
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

GJC Web Design

I understand exactly the problem u are getting and I get the same

But what I am saying is .. when you select the dropdown an ajax call is made for the selected child and returned where it "replaces" the content in the div .productdetails-view via the dynupdate.js scripts

the url is e.g. https://danishcaresupply.dk/hj%C3%A6lpredskaber-til-havearbejdet/test-produkt-demo-med-det-hele-2-detaljer?tmpl=component&format=html&dynamic=1 which returns the correct content.

What ISN'T happening is the correct substitution of the content in that div -
the view below is missing so much code and all the JS - why?

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

But that does not explain how it can work when the reload/refresh button is clicked?

It would be logical if it was an Virtuemart template override. But if I deactivate all the overrides the problem is still there even though it is using default Virtuemart code?
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

GJC Web Design

you need to debug the problem.. it is of course not a problem for other users so "something" is different on yours.

use the normal debug techniques  - start with a clean install .. add stuff until it breaks or compare the clean working with your broken
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

That's just it. I feel that I have attempted changing everything and all constellations:

  • SEF
  • Overrides
  • VM version
  • Cache
  • GZIP
  • Template

So I don't really know where to look any longer...
Danish Joomla Services: www.toolmaster.dk
Danish Joomla Services: www.joomla-konsulent.dk
Danish Joomla Hosting: www.joomla-hosting.dk
Danish Smart Home: www.smart-home-konsulent.dk
Danish Subject Blog: www.sutra.dk

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation