Problem with pushing Xslt functions

Topics: XSLT
Jun 22, 2011 at 6:22 PM

Hello.

I have a running dev environment with a local sqlexpress db using the SqlServerDataProvider package.  After most of my application was complete, I used a copy of this database to create a staging instance of my application.  Typically what I do is modify things on my dev environment, commit changes to things like Xslt functions, etc, to a svn database, then just push those out to staging.  However I just ran into a problem.  I had created a new Xslt function and pushed it to my staging instance.  The staging instance does not recognize it.  Furthermore, when I recreate it, it then recognizes the file, but does not have any of the associated function calls.  I narrowed down the problem to the fact that when you add new function calls, it adds another entry to Composite_Data_Types_IXsltFunction_Published table, and its associated function calls are added to Composite_Data_Types_INamedFunctionCall_Published.  However, when I manually copy these db entries from my local dev db to the staging db, it still is not recognized.  When I go into the Composite C1 interface on staging, I see my Xslt function there, however the function calls are still not associated.

1. What am I missing?  

2. How do you handle pushing code like this?  I don't want to have to do an entire db backup of my dev to staging everytime.

Jun 22, 2011 at 9:16 PM
Edited Jun 22, 2011 at 9:29 PM

Good to see that you're using VCS for managing your code!

The following is a list of Core C1 datatypes that i put under version control in my setups which works fine

  • Composite.Data.Types.IFolderWhiteList
  • Composite.Data.Types.IGeneratedTypeWhiteList
  • Composite.Data.Types.IMethodBasedFunctionInfo
  • Composite.Data.Types.INamedFunctionCall
  • Composite.Data.Types.IPageHostNameBinding
  • Composite.Data.Types.IPageTemplate
  • Composite.Data.Types.IPageType
  • Composite.Data.Types.IParameter
  • Composite.Data.Types.ISystemActiveLocale
  • Composite.Data.Types.IXsltFunction

Looking through the list it looks like you're missing at least the Composite.Data.Types.IParameter type.

For your second question of how to handle publishing of code like this i highly recommend Redgates tools, Sql Source Control and Compare

Jun 23, 2011 at 2:37 PM

Thanks sir, for now I just went ahead and copied those particular tables and it seems to have solved the problem.  I will look into one of those tools, but honestly I wish I hadn't used the SqlServerDataProvider package now.  Is there a way to uninstall this package and revert back to using the XML files?

Coordinator
Jun 23, 2011 at 3:26 PM

We haven't developed a SQL->XML migration tool, but the code is very similar so it should be possible. If we crate one I will post here.

Jun 24, 2011 at 7:27 AM
Edited Jun 24, 2011 at 7:27 AM

hrplex,
There is a chance you can solve your SQL to XML problem with package creator. At this moment it's could pack all standard things. So give a try. Also.. if you speaking about XSLT / functions calls.. I'd make package with functions (it's automatic with package creator).. install it on the site.. and if I have fresh version - just uninstall xslt functions package and install new. If datatype changes involved - probably do it in manually, just before new package install.

Jul 1, 2011 at 8:01 AM

We updated our package Composite.Tools.DataStoreMigrator, it's should make the trick.

Jul 25, 2011 at 9:40 PM

I know this topic is almost a month old, but I've been hard at work on my site and ran into a related issue.

I was doing a push of updates from my dev instance to staging again.  My problem is that one of my Page datafolder types is now completely missing (it's called CaseStudies).  If I go into the Data Perspective, it's gone.  In the Content Perspective, the folder itself is still there on the page that has it, but I cannot see the content under it.  The content itself is still in my SQLServer db.  I have an Xslt function that calls GetCaseStudiesXml (the built in xml function that is associated to that type), but it fails because GetCaseStudiesXml is no longer defined.

Last time I had an issue doing this, I copied the tables from burningrice's post and it solved my issue.  This time I made a push and transferring those tables did not work.  

All I did was add another field to the Page Datafolder type that is missing.  I believe there must be something really simple that is causing this disconnection.  Any help would be appreciated.

Jul 25, 2011 at 9:46 PM

Sounds like some datatype is not being generated correctly. Try check your serverlog to see if there is any errors with validating the interface, updated your database schema or something similar to that.

Jul 26, 2011 at 2:04 PM

This is really strange.  After almost pulling my hair out trying to figure out the problem yesterday, this morning I come in and it's all fine.  Does this have something to do with the Component.Generated.dll not properly generating?  I thought resaving web.config causes this file to be regenerated?