OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Meta Titles are not working

This topic contains 11 replies, has 4 voices, and was last updated by Xavier Xavier 5 months ago.

  • Creator
    Topic
  • #38613

    marius.negoescu
    Participant

    If you add meta titles to a product then you can’t export the products csv from the Products listing page.

    It seems the problem lies within the way the meta titles are saved, using the string field rather than the text field from the oro_fallback_localization_val table.

    I have tested this on my local installation and on the demo site here: https://demo.orocommerce.com

    Can you guys confirm this is a problem and possibly a solution to change the information to be saved in the text field rather than the string field ?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #38623
    Michael
    Michael
    Keymaster

    Thank you for the report, we’ll check it.
    (internal reference – BB-16611)

    #38846

    marius.negoescu
    Participant

    Any news on this issue ?

    Cheers, Marius

    #38848
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi Marius,

    The issue is already fixed in master and will be released in 3.1.7.

    #38855

    marius.negoescu
    Participant

    I have added the migration schema v1_6 and loaded the migration but it’s still not working.

    php bin/console oro:migration:load –force –bundles=OroSEOBundle

    But the export is still not working.

    I think the issue was supposed to be resolved the other way around.

    The metaTitles should use the text field instead of the string field, not the other way around as in your fix. I tested the use of the text field instead of the string fieldon my local version and it is working fine.

    Cheers, Marius

    #38857
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    What is the reason for making the field type equal to text?

    The first result from Google saying that there is no reason to make a title more than 60 characters long. String length is 255, looks like it should be enough.

    Google typically displays the first 50–60 characters of a title tag. If you keep your titles under 60 characters, our research suggests that you can expect about 90% of your titles to display properly. There’s no exact character limit because characters can vary in width and Google’s display titles max out (currently) at 600 pixels.

    In case someone already imported the title that is longer than 255 characters, the migration will truncate it. This should not be an issue.

    #38859

    marius.negoescu
    Participant

    What I am trying to say is, the fix you implemented is not working.

    You still can’t export even with the fix you added.

    The export backend header doesn’t contain the string field, only the text field. This is the error that is generating:

    Backend header doesn’t contain fields: metaTitles:default:string

    Cheers, Marius

    #38860
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    What exact version of OroCommerce are you using?

    #38861

    marius.negoescu
    Participant

    I am using version 3.0.0-rc.

    The problem is I implemented the solution in here https://github.com/oroinc/orocommerce/commit/29298418ffdb01ce2cc35c0d8d2df325ef0afa9b and the export still didn’t work.

    When I modified the columns to use text column instead of string column it worked. The problem might lie within the export iself…

    Cheers, Marius

    #38862
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    I am using version 3.0.0-rc.

    This is the root issue because there is a big difference between 3.0.0-rc version, that is not supported anymore and ongoing 3.1.7, so backporting the single migration is not an option.

    Please consider upgrading to 3.1.* in order to get bug and security fixes.

    #38868

    marius.negoescu
    Participant

    Ok, that makes sense.

    If anyone needs to have this working and they don’t have 3.1.x then they should consider switching the columns to get it working.

    Cheers, Marius

    #38907
    Xavier
    Xavier
    Participant

    Hi,

    If you want to set up the metaTitles without updating application for the moment, it’s possible to set the block option with layout in “oro_product_frontend_product_view” like this :


    layout:
    actions:
    - '@setOption':
    id: meta_title
    optionName: content
    optionValue: '=data["locale"].getLocalizedValue(data["product"].getNames())'

    With this method, the metaTitle tag will be filled with the product name.

    Cordially

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No