Author Topic: Loading frontend child product results in empty page until page is reloaded  (Read 3210 times)

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3455
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Quote
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
what do u mean with
Quote
The 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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Thomas Kampp

  • Jr. Member
  • **
  • Posts: 67
  • Joomla Developer
    • Toolmaster.dk
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
install this -> http://dev.virtuemart.net/attachments/download/1145/VirtueMart3.4.2_Joomla_3.8.12-Stable-Full_Package.zip

takes 5 mins

does it work?

if so there's your starting point

If not then assume server related
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation