deface icon indicating copy to clipboard operation
deface copied to clipboard

Same override being called multiple times

Open andreteves opened this issue 11 years ago • 4 comments

All my Deface Overrides are being called 3 times in the same page load.

For example, I have the following override:

Deface::Override.new(:virtual_path => "spree/shared/_sidebar", 
                     :name => "subscribe", 
                     :insert_bottom => "aside", 
                     :partial => "spree/shared/subscribe",
                     :original => '583d3e1ae41e681779da7cdac8bee81e4efdb436')

When the page is loaded log shows:

Rendered spree_xxxx_theme/app/views/spree/shared/_cart.html.erb (2.9ms)
Rendered spree_xxxx_theme/app/views/spree/shared/_header.html.erb (6.4ms)
Deface: 1 overrides found for 'spree/shared/_sidebar'
Deface: 'subscribe' matched 1 times with 'aside'
Deface: 1 overrides found for 'spree/shared/_sidebar'
Deface: 'subscribe' matched 1 times with 'aside'
Deface: 1 overrides found for 'spree/shared/_sidebar'
Deface: 'subscribe' matched 1 times with 'aside'
Rendered spree_xxxx_theme/app/views/spree/shared/_sidebar.html.erb (1.4ms)

Everything is working fine in my app, but this behaviour seems very weird. Not sure what I have changed - in past overrides used to be called only once. Any idea on what might be causing it?

Thanks!

andreteves avatar Apr 27 '13 12:04 andreteves

I am unable to reproduce this issue on my 1-3-stable app. Could you please provide an application that does reproduce this issue?

Thanks!

radar avatar Apr 29 '13 04:04 radar

I also see same overrides called from 3 to 9 times on the same request (spree 1.3, deface 1.0.0.rc3), will try to reproduce in a clean app

$ rails s | grep "overrides found"
Deface: 8 overrides found for 'spree/layouts/admin'
Deface: 1 overrides found for 'spree/admin/shared/_product_tabs'
Deface: 1 overrides found for 'spree/admin/shared/_product_tabs'
Deface: 1 overrides found for 'spree/admin/shared/_product_tabs'
Deface: 6 overrides found for 'spree/admin/products/_form'
Deface: 6 overrides found for 'spree/admin/products/_form'
Deface: 6 overrides found for 'spree/admin/products/_form'
Deface: 8 overrides found for 'spree/layouts/admin'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'
Deface: 2 overrides found for 'spree/admin/products/new'

alepore avatar Aug 20 '13 07:08 alepore

As I said before:

I am unable to reproduce this issue on my 1-3-stable app. Could you please provide an application that does reproduce this issue?

Thanks!

radar avatar Aug 30 '13 00:08 radar

Sorry, still have the problem after upgrading my big custom app to spree 2.0 but i'm unable to reproduce on a clean app or just localize the problem.

alepore avatar Oct 09 '13 06:10 alepore