Deface: [ERROR] The original source for 'auth_shared_login_bar' has changed, this override should be reviewed to ensure it's still valid.

555 views
Skip to first unread message

ma angie

unread,
May 29, 2015, 2:15:44 PM5/29/15
to spree...@googlegroups.com
Hi all.
I tried to install spree, and sample db.
But the app dumps include of some deface errors.
Please help me to avoid the errors.

The error is such as:

Deface: 1 overrides found for 'spree/shared/_nav_bar'
Deface: 'auth_shared_login_bar' matched 1 times with 'li#search-bar'
Deface: [ERROR] The original source for 'auth_shared_login_bar' has changed, this override should be reviewed to ensure it's still valid.
   (0.1ms)  SELECT MAX("spree_taxons"."updated_at") FROM "spree_taxons" WHERE "spree_taxons"."parent_id" IS NULL
  Spree::Taxon Load (0.1ms)  SELECT "spree_taxons".* FROM "spree_taxons" WHERE "spree_taxons"."parent_id" IS NULL  ORDER BY "spree_taxons"."lft"
  Rendered /Users/maangie/.rvm/gems/ruby-2.2.1/gems/spree_frontend-3.0.1/app/views/spree/shared/_search.html.erb (4.1ms)

My source code is there.

Please tell me in advance.

* JAPANESE *
こんにちは。
spree のサンプルDB をインストールしようとしています。
しかし、アプリを立ち上げると、上記のようなエラーが発生します。
このエラーを取り除くにはどうすればよいでしょうか?
ご教示頂きたくお願い申し上げます。

なお、ソースコードは以下で公開しています。

ma angie

unread,
Jun 2, 2015, 10:34:50 PM6/2/15
to spree...@googlegroups.com
I made `app/overrides/auth_login_bar.rb' as below.

Deface::Override.new(:virtual_path => "spree/shared/_nav_bar",
 :name => "auth_shared_login_bar",
 :insert_before => "li#search-bar",
 :partial => "spree/shared/login_bar",
 :disabled => false,
 :original => nil)

And I was get warning as below.

Deface: [WARNING] No :original defined for 'auth_shared_login_bar', you should change its definition to include:
 :original => 'c00d67dfc0496d21a351b48c41a728412cb5ed2c'

So, I was fixed `app/overrides/auth_login_bar.rb' as below.

Deface::Override.new(:virtual_path => "spree/shared/_nav_bar",
 :name => "auth_shared_login_bar",
 :insert_before => "li#search-bar",
 :partial => "spree/shared/login_bar",
 :disabled => false,
 :original => 'c00d67dfc0496d21a351b48c41a728412cb5ed2c')

Then the app not dumps include of any error.

aravind ratna

unread,
Jun 3, 2015, 7:21:55 AM6/3/15
to spree...@googlegroups.com
Hi Angie,
       
              Is it fixed or it have to be fixed??
Message has been deleted

ma angie

unread,
Jun 3, 2015, 10:35:54 AM6/3/15
to spree...@googlegroups.com
I fixed (NOT have to be fixed) the error by myself writing app/overrides/auth_login_bar.rb like this:

Deface::Override.new(virtual_path: "spree/shared/_nav_bar",
                     name: "auth_shared_login_bar",
                     insert_before: "li#search-bar",
                     partial: "spree/shared/login_bar",
                     disabled: false,
                     original: 'c00d67dfc0496d21a351b48c41a728412cb5ed2c')

After the code, the error has gone.

I'm sorry my little English.

aravind ratna

unread,
Jun 4, 2015, 2:18:59 AM6/4/15
to spree...@googlegroups.com
oh Cool...!!
Anyways thats good
one more doubt 
Whats that text beside original:
->what is this ??>>c00d67dfc0496d21a351b48c41a728412cb5ed2c
is it the some API key or what??

Rubén González

unread,
Jun 4, 2015, 3:46:45 AM6/4/15
to spree...@googlegroups.com
Is a "checksum" string that represents the original content of the overridden view, so you can see when the original view has been updated and modify your custom view accordingly.

You can read about it here: https://github.com/spree/deface#optional

aravind ratna

unread,
Jun 4, 2015, 5:01:26 AM6/4/15
to spree...@googlegroups.com
how to find out that checksum for my application?
Sorry my questions may be irritating but i'm new to spree   

Rubén González

unread,
Jun 4, 2015, 6:04:48 AM6/4/15
to spree...@googlegroups.com
Don't worry.

One option (I don't know if other options exists): Don't set the original option in the override declaration, then visit the page that uses the overridden view and you will see a warning in the console, like this:


Deface: [WARNING] No :original defined for 'auth_shared_login_bar', you should change its definition to include:
 :original => 'c00d67dfc0496d21a351b48c41a728412cb5ed2c'



aravind ratna

unread,
Jun 4, 2015, 6:23:42 AM6/4/15
to spree...@googlegroups.com
Dude its not working its still showing the same error even after removing the original: attribute

Deface: 1 overrides found for 'spree/shared/_nav_bar'
Deface: 'auth_shared_login_bar' matched 1 times with 'li#search-bar'
Deface: [ERROR] The original source for 'auth_shared_login_bar' has changed, this override should be reviewed to ensure it's still valid.

ma angie

unread,
Jun 4, 2015, 6:31:15 AM6/4/15
to spree...@googlegroups.com
Don't remove original:, but set with nil like this:

Deface::Override.new(virtual_path: "spree/shared/_nav_bar",
                     name: "auth_shared_login_bar",
                     insert_before: "li#search-bar",
                     partial: "spree/shared/login_bar",
                     disabled: false,
                     original: nil)

aravind ratna

unread,
Jun 4, 2015, 7:59:16 AM6/4/15
to spree...@googlegroups.com
Thanks Angie it worked out!!!

Thanks Ruben for the Help :)

Reply all
Reply to author
Forward
0 new messages