Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wade 11 posts 31 karma points
    May 29, 2017 @ 13:59
    Wade
    0

    useIfEmpty NOT WORKING - major SEO Flaw

    Normally the “useIfEmpty” field if used, shows the property when the value is empty – such as

    This would place the metaTitle in this area, and if that was blank – it would use the @pageName property.

    This doesn’t work any longer in Umbraco 7 – Will this be fixed?

    What it does now, is just traverse up the tree until it finds a page that has that property filled out (metaTitle) and shows that one. It never shows the page name.

      This is not how it is suppose to function and really plays havoc with SEO and people that aren't aware may be loosing rankings/traffic due to this.  
    
  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    May 29, 2017 @ 14:10
    Alex Skrypnyk
    0

    Hi Wade

    Can you show the source code of your partial?

    Alex

  • Wade 11 posts 31 karma points
    May 29, 2017 @ 14:12
    Wade
    0

    keeps stripping out the code :: I am not using any partial view or macro to view - just a basic Umbraco page field with the normal code like this :: [<umbraco:Item field="metaTitle" useIfEmpty="pageName" runat="server">]. It was working for years, but since upgrading to 7 - doesn't seem to work any longer. Thanks.

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    May 29, 2017 @ 14:17
    Alex Skrypnyk
    0

    It should work, there are not so many changes in Umbraco 7.6

    List of breaking changes - https://our.umbraco.org/documentation/getting-started/setup/upgrading/760-breaking-changes

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    May 31, 2017 @ 08:28
    Sebastiaan Janssen
    0

    Oh it's been (accidentally!) broken for a very long time, it looks like it broke in 7.3.2 already.

  • Wade 11 posts 31 karma points
    May 29, 2017 @ 14:21
    Wade
    0

    Yes it should - thus why I am submitting this to the forum to see if others are having the same issues with this. I understand that it isn't in the "List of Breaking Changes" - but many things do break as you create new functionality and change existing functions. Looking for anyone else having this issue and if there is a fix for this. Thanks.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    May 31, 2017 @ 08:24
    Sebastiaan Janssen
    1

    This should be fixed in 7.6.3 - http://issues.umbraco.org/issue/U4-9971

    You'll be able to do: @Umbraco.Field("metaTitle", altText:"[#pageName]") to do what you want to do.

    For now, you can use:

    @{ 
        var metaTitle = Model.Content.GetPropertyValue<string>("metaTitle");
        if (string.IsNullOrWhiteSpace(metaTitle))
        {
            metaTitle = Model.Content.Name;
        }
    }
    

    And then later on you can use the metaTitle variable, for example:

    <meta property="og:title" content="@metaTitle" />

  • Wade 11 posts 31 karma points
    May 31, 2017 @ 12:16
    Wade
    0

    This feature also is broke on Rich Text editors. I have noticed it broke in some templates, but just fixed it to make work. However, it is still a bug that should be fixed.

    As well, do you have a non-razor fix for this - we just use the normal webforms with the property and not the razor templates or MVC.

    Will that be fixed in the 7.6.3 - or just the razor fix?

    Thanks.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    May 31, 2017 @ 12:39
    Sebastiaan Janssen
    0

    I think the fix in 7.6.3 is for both razor and masterpages.

    There's many bugs that should be fixed, but it's doubtful that they ever will be, our main focus is on fixing MVC related bugs, WebForms is obsolete and no longer something we can help a lot with. Feel free to send us a pull request though, we'll happily look at it.

    More info on WebForms support here: http://issues.umbraco.org/issue/U4-9930#comment=67-36838

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jun 02, 2017 @ 12:51
    Sebastiaan Janssen
    0

    7.6.3 is out now, if you would like to give it a go!

  • Wade 11 posts 31 karma points
    Jun 12, 2017 @ 11:18
    Wade
    0

    We are upgrading this week, thanks for the fix - we will try it out let you know if it is all good.

Please Sign in or register to post replies

Write your reply to:

Draft