More in this section

Forums / Developing with Sitefinity / Searching for values in Page Controls

Searching for values in Page Controls

1 posts, 0 answered
  1. John
    John avatar
    9 posts
    03 Nov 2011
    20 Mar 2012
    Link to this post
    I have a website with a lot of pages for a client that we migrated over from Sitefinity 3.7 to 4.x, and we're looking into migrating over to 5.x before too long.

    In the meantime though... One of the issues I'm trying to resolve for my client is that we have a lot of bad links and images carried over from pages created in the old site to the new site and they're cleverly hidden within things like Content Block (Telerik.Sitefinity.Modules.GenericContent.Web.UI.ContentBlock) controls within pages, and we see these exceptions come up on our logs so I want to hunt them all down and fix them (we have a lot of pages so this would easily take TONS of hours to go through manually).

    (e.g. On the old side we had some Content Blocks that had img tags pointing "/images/spacer.gif" and on the new site it's "/Content/images/spacer.gif" so it throws up exceptions in the logs, and these are contained within legacy pages all of our template pages are correct.)

    Is this the correct SQL to search for that information, or am I missing some joins in here?

           sfpn.[title_] as page_title
          ,sfpn.[url_name_] as page_url
          ,sfcp.[nme] as control_name
      FROM [dbo].[sf_control_properties] sfcp
      JOIN [dbo].[sf_object_data] sfod ON (sfcp.[control_id]=sfod.[id])
      JOIN [dbo].[sf_page_node] sfpn ON (sfod.[page_id]=sfpn.[id])
      lower([val]) like '%spacer.gif%'
      order by
1 posts, 0 answered