Question

Photo of Nathan Parikh

0

Custom TransactionEntry Block Help

I'm trying to modify the built-in TransactionEntry.ascx/.cs block by copying it and modifying it to create my own custom block.

So far I've modified the Inherits argument in the .ascx file and the corresponding namespace and public partial class in the .ascx.cs file and have left everything else the same. However, when I run the block, it gives the following error:

c:\inetpub\wwwroot\Plugins\org_hbcfw\HelloWorld.ascx.cs(446): error CS0117: 'Rock.SystemGuid.EntityType' does not contain a definition for 'FINANCIAL_GATEWAY_TEST_GATEWAY'

at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at Rock.Web.UI.RockPage.OnInit(EventArgs e)

Any tips?

  • Photo of Daniel Hazelbaker

    0

    Hi Nathan, My best guess is that you downloaded the TransactionEntry block from github which is a much more recent version of the block than you currently have. Code downloaded from github will not always be compatible with your running version of Rock as they might be using features that are new and don't exist in release versions yet, as is this case. The FINANCIAL_GATEWAY_TEST_GATEWAY was a definition added just 2 months ago to github, so it is very unlikely that it exists in any release version of Rock. Your best bet would be to duplicate the TransactionEntry block from your same Rock installation and use that as a starting point.

  • Photo of Nathan Parikh

    0

    Thanks Daniel! I definitely got it from GitHub so that's probably the issue. 

    I'll give that a try and let you know!