• Welcome to KonaKart Community Forum. Please login or sign up.
 

bad keyword, tittle and description.

Started by ByDcc, February 18, 2009, 07:29:41 pm

Previous topic - Next topic

ByDcc

   Hello,
   I would like to change meta information for my store and I did the next:

1) I copied Messages_es.properperties as Message.properties so they are identical
2) I changed the next properties:
seo.default.title=My title
....
# Default Meta Description
seo.default.meta.description=My description
.....
# Template for Meta Description tag when viewing a list of products within a category
seo.category.meta.description.template=Compre $category aquí.
# Default Meta Keywords
seo.default.meta.keywords=My keywords

   I can see the html pages in Spanish but meta information appear in english I mean that information is taken from Message_en.properties. I don't know way. Some titles also appear in english, for example, Buy $category here instead of Compre $category aquí

   I saw MainLayout.jsp and the the next code:

      <title id="target.title"><%=kkEng.getPageTitle()%></title>
      <meta name="keywords" content="<%=kkEng.getMetaKeywords()%>" />
      <meta name="description" content="<%=kkEng.getMetaDescription()%>" />

   might KKAppEng take that information from the wrong file? Why?
   Any other suggestion?

   Thanks.

trevor

Do you have Spanish set as your default language? Look at the Admin App in the Localizations>>Languages section.

ByDcc

   I saw that behaviour even clicking on the spanish flag. But I fix the problem copying Messages_es over Messages and Messages_en
   But now I've started up another store to show the problem but it is running well without overwriting Messages_en.

   I'll post again if I see the problem an other time.

   Thank you.

ByDcc

   Hi again,
   I've seen the problem again with the new store.

   There is only one language Spanish. And this one is selected as default.
   You can see "english version" in the page title. And if you see the page source you will see "english version" in the title, and description meta tag.

http://www.turinconoriginal.com

    Message.properties and Messages_es.properties are in Spanish. Messages_en.properties is in Spanish with "english version".

   Even if you click on the Spanish flag has this behaviour.

ByDcc

   Hi again,
   I can't fix this problem if I don't know what kkEng is doing.

   If you check the next url:
http://www.turinconoriginal.com:8080/turinconoriginal/Welcome.do
you can see in the title: "english version" bla bla bla....
   And the meta tags are also wrong
      <title id="target.title">english version - Tu Rinc&oacute;n Original - Tienda Virtual</title>
   <meta name="description" content="English version - Tu rinc&oacute; original es una tienda que

   And if you click on the spanish flag the error continues.

   kkEng is taken that information from the wrong properties file.

   Might it be a bug?

   Thanks in advance.

julie

Take a look at one of the action classes such as ShowProductDetailsAction.java where the meta data gets created. Maybe that will give you an idea about why the wrong language is being picked up.

ByDcc

   I got this information:

* Main page:
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:62) xxx request locale: es_ES
04-Mar 00:27:55 DEBUG (?:<init>:?) Entering KKAppEng Constructor()
04-Mar 00:27:55 INFO  (?:<init>:?) Engine used by application is com.konakart.app.KKEng
04-Mar 00:27:55 DEBUG (?:<init>:?) Got Eng Instance
04-Mar 00:27:55 DEBUG (?:<init>:?) Instantiated managers
04-Mar 00:27:55 DEBUG (?:<init>:?) Setup default language
04-Mar 00:27:55 DEBUG (?:<init>:?) Leaving KKAppEng constructor
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:66) xxx  kkAppEng.getLocale() locale: es_ES
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:67) xxx  metakeywords: Ropa orginal pintana mano english version
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:68) xxx  page title: english version - Tu Rinc&oacute;n Original - Tienda Virtual
04-Mar 00:27:55 DEBUG (?:searchForProductsPrivate:?) Product Search = ProductSearch:
priceFrom = null

* A selected product
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:62) xxx request locale: es_ES
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:66) xxx  kkAppEng.getLocale() locale: es_ES
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:67) xxx  metakeywords: Ropa orginal pintana mano english version
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:68) xxx  page title: english version - Tu Rinc&oacute;n Original - Tienda Virtual
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:97) Product Id of selected product from application = 3
04-Mar 00:28:09 DEBUG (?:getProduct:?) getProduct Query1 = SELECT specials.specials_new_products_price, specials.status, .....
.......
......products_options_values.language_id=3 AND products_attributes.products_id=3 ORDER BY products_options.products_options_id ASC
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:62) xxx request locale: es_ES
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:66) xxx  kkAppEng.getLocale() locale: es_ES
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:67) xxx  metakeywords: Ropa orginal pintana mano english version
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:68) xxx  page title: english version - Tu Rinc&oacute;n Original - Tienda Virtual
04-Mar 00:28:09 DEBUG (ShowProductDetailsAction.java:execute:97) Product Id of selected product from application = 3
04-Mar 00:28:25 DEBUG (?:getConfiguration:?) The configuration referenced by the key CLIENT_CONFIG_CACHE_CHECK_FLAG = Configuration:
id = 87
key = CLIENT_CONFIG_CACHE_CHECK_FLAG
.......







ByDcc

   Well, I did some tests and I think now what's happening.

   I think that some pieces of Konakart aren't multi language and they are taken the language from the system properties.

   I've see this problem in two places:

1) Footer.jsp. I've always seen this date with english format.
The original code was:

<td width="30%" align="left"><%=new SimpleDateFormat("EEEE d MMMM, yyyy ").format(new Date())%></td>

but if you add the locale information in the request I can see "jueves 5 marzo, 2009 " instead of "Thursday 5 March, 2009 "

<td width="30%" align="left"><%=new SimpleDateFormat("EEEE d MMMM, yyyy ", [b]request.getLocale()[/b]).format(new Date())%></td>


2) KKAppEng.java
   This component is taken all seo information from the wrong file. It's a big problem for me.

   In my local environment I see all the information in Spanish, including the seo information. But in my
hosting environment I see all the seo information bad.

   You can see it in http://www.turinconoriginal.com:8080/turinconoriginal/Welcome.do
   I added the literal "english version" in all seo properties in Messages_en.properties

   If you move by categories the problem persist.


   In my last post I wrote down traces in which I showed the locale in the request object and the locale in KKAppEng.java. Both of
them are es_ES but the seo info is shown in english.

   In fact, I've reviewed all the other stores in http://www.konakart.com/customers and all of then have only one language.



   I think it's a bug. Does someone know a way to fix this problem?

   Thanks in advance.

julie

Quote2) KKAppEng.java
   This component is taken all seo information from the wrong file. It's a big problem for me.


I've just tried this on my machine and it seems to work fine.

QuoteIn my local environment I see all the information in Spanish, including the seo information. But in my
hosting environment I see all the seo information bad.


That's a bit suspicious  ???

ByDcc

   Why is suspicious?.
   My local environment has spanish language in the system properties.
   The hosting environment has english language in its system properties.

   All the information with <bean:message key="...."> is ok. And all the information with KKAppEng.getXXXX() is bad.

   Try http://www.konakart.com/konakart/SetLocale_es_ES.do and see the date in the footer.
   And then take a look to the source of the page and see the seo information:

<title id="target.title">KonaKart</title>
<meta name="keywords" content="KonaKart Java Shopping Cart eCommerce" />
<meta name="description" content="Powered by KonaKart Java Shopping Cart " />


   Could you tell me if you have different Messages_en.properties and Messages_es.properties in your machine?
   And do you have different seo properties and can you confirm if you can see this information well?

   Thanks in advance.




trevor

You have all of the source code in the action classes to see how these strings are getting created. Why don't you just debug through it ?

ByDcc

   Hi,
   I did it.
   I saw the action classes CatalogMainPageAction and ShowProductDetailsAction and wrote down here the results, in previous posts:

04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:62) xxx request locale: es_ES
........
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:66) xxx  kkAppEng.getLocale() locale: es_ES
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:67) xxx  metakeywords: Ropa orginal pintana mano english version
04-Mar 00:27:55 DEBUG (CatalogMainPageAction.java:execute:68) xxx  page title: english version - Tu Rinc&oacute;n Original - Tienda Virtual

   For example, the first class called in CatalogMainPageAction is KKAppEng. This class has the right locale as you can see in the trace but it has been built with the wrong meta information.
   I don't have the source of KKAppEng.class to see why it has happening.

   I'll follow any suggestion you can give me to fix it.

   Thank you.

trevor

Look at getCatMessage() in BaseAction. That's the method that gets the message from the message catalog.

ByDcc

   Hi again,
   I was working with the previous version to 3.2.0.0 and  the method getKKAppEng  in BaseAction was the problem:

        if (kkAppEng == null)
        {
            kkAppEng = new KKAppEng();
            session.setAttribute(KKAppEng.KONAKART_KEY, kkAppEng);
            Constants.init(getResources(request));
        }
       
        kkAppEng.setPageTitle(Constants.seoDefaultTitle);
        kkAppEng.setMetaDescription(Constants.seoDefaultMetaDescription);
        kkAppEng.setMetaKeywords(Constants.seoDefaultMetaKeywords);

Constants was initialized once.

   In version 3.2.0.0 this problem has been fixed with the method getCatMessage

        kkAppEng.setPageTitle(getCatMessage(request, "seo.default.title"));
        kkAppEng.setMetaDescription(getCatMessage(request, "seo.default.meta.description"));
        kkAppEng.setMetaKeywords(getCatMessage(request, "seo.default.meta.keywords"));


   Thank you very much for your help.