Visual Query error on DNN 7.2.2

Aug 18, 2015 at 8:16 PM
Edited Aug 21, 2015 at 7:16 PM
I thought I'd try out the Visual Query editor but when clicking the button from the Admin menus (on any module) I'm getting an error:
AssemblyVersion:7.2.2

PortalID:0

PortalName:DNN 722 Website

UserID:1

UserName:host

ActiveTabID:89

ActiveTabName:Another Page

RawURL:/Another-Page?mid=421&popUp=true&AppId=6&ctl=editcontentgroup&AttributeSetId=&AssignmentObjectTypeId=4&prefill=%7B%22TestParameters%22%3A%22%5BModule%3AModuleID%5D%3D421%22%7D&editMode=New&ReturnUrl=%2FAnother-Page%2Fctl%2Fpipelinemanagement%2Fmid%2F421%3FReturnUrl%3D%25252fAnother-Page%25252fctl%25252fWebApiHelp%25252fmid%25252f421%25252fAppId%25252f6%25253fpopUp%25253dtrue%26popUp%3Dtrue%26AppId%3D6

AbsoluteURL:/Default.aspx

AbsoluteURLReferrer:http://localhost/Another-Page/ctl/pipelinemanagement/mid/421?ReturnUrl=%252fAnother-Page%252fctl%252fWebApiHelp%252fmid%252f421%252fAppId%252f6%253fpopUp%253dtrue&popUp=true&AppId=6

UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:dd011dde-e77b-4137-984b-f7f5f8b8045d

InnerException:Specified argument was out of the range of valid values. Parameter name: index

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:System.Web.UI.ControlCollection.get_Item

StackTrace:

Message:

DotNetNuke.Services.Exceptions.PageLoadException: Specified argument was out of the range of valid values.
Parameter name: index ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
   at System.Web.UI.ControlCollection.get_Item(Int32 index)
   at ToSic.SexyContent.EditContentGroup.Page_PreRender(Object sender, EventArgs e)
   at System.Web.UI.Control.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
I've tried on two different installs of dnn 7.2.2 so think it's something unique to this version of dnn.
Coordinator
Aug 24, 2015 at 12:34 PM
I'm guessing you've been hit by the home-page bug. Try doing whatever you were doing from a module which is not on home - it will probably work
Aug 24, 2015 at 1:07 PM
I wondered that but it happens on child pages as well. I also tried turning off modal popups but got the same error. I've tried on DNN v7.4.1 with no luck either.
Coordinator
Aug 24, 2015 at 3:24 PM
You may be hitting different issues in each version.
just so I understand you correctly
  • Not on home-page
  • single language dnn
  • DNN version is 7.2.2
  • admin works, content-types works, but the button "Visual Designer..." fails (the one which should show you a list of queries
Or does something else fail?
Coordinator
Aug 24, 2015 at 3:24 PM
BTW: the most stable dnn as of now is 7.3.4.
Aug 24, 2015 at 6:44 PM
Edited Aug 24, 2015 at 6:44 PM
  • Not on home-page - correct
  • single language dnn - yep, USA
  • DNN version is 7.2.2 - yep
  • admin works, content-types works, but the button "Visual Designer..." fails (the one which should show you a list of queries
The Visual Designer button works so I can get to Pipeline Management but the error occurs when clicking the New button. I've just tried disabling language parameters in URLs in the Language settings tab for DNN but no luck. Also I realised I was running as super user so just tried a standard admin account but that also errored. Happy to try anything else settings wise that might help.
Coordinator
Aug 25, 2015 at 3:47 PM
Edited Aug 25, 2015 at 3:47 PM
I'm not 100% sure but I believe there is something wrong with the URL.

My example: GET /Blog?mid=541&popUp=true&AppId=25&ctl=editcontentgroup& AttributeSetId=792 &AssignmentObjectTypeId=4&prefill=%7B%22TestParameters%22%3A%22%5BModule%3AModuleID%5D%3D541%22%7D&editMode=New&ReturnUrl=%2FBlog%2Fctl%2Fpipelinemanagement%2Fmid%2F541%3FReturnUrl%3D%25252fBlog%25252fctl%25252fWebApiHelp%25252fmid%25252f541%25252fAppId%25252f25%25253fpopUp%25253dtrue%26popUp%3Dtrue%26AppId%3D25


you seem to be missing that attributesetid. That's another word for "ContentTypeId" - yours will have another number, but it should have a number - and it doesn't.

I can't guess why it's missing - technically it should check the storage system for Pipeline-Content-Types and insert that content-type ID there. Does your installation have a special history? Is it a new-install or an upgrade? did you ever "correct" something manually in the DB?
Aug 25, 2015 at 4:29 PM
Nothing special with the install of DNN. I've installed 2sxc on a 7.2.2 install, on a local 7.4.1 install on my work PC and a local install of 7.4.1 at home and all three exhibit the same error. It also doesn't matter if I try the Visual Query Designer from my own module or one of the demo modules.

I can see the various tables for 2sxc on my install. For testing, is there any particular table value I should try to manually lookup and paste into the URL?
Coordinator
Aug 26, 2015 at 7:22 AM
Basically
/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [AttributeSetID]
      ,[StaticName]
      ,[Name]
      ,[Scope]
      ,[Description]
      ,[ChangeLogCreated]
      ,[ChangeLogDeleted]
      ,[AppID]
      ,[UsesConfigurationOfAttributeSet]
      ,[AlwaysShareConfiguration]
  FROM [C:\PROJECTS\WEBMATRIX\DNN PLATFORM 740B\APP_DATA\DATABASE.MDF].[dbo].[ToSIC_EAV_AttributeSets]
  Where StaticName = 'DataPipeline'
Should return a list of a lot of similar entries:
AttributeSetID StaticName Name Scope Description ChangeLogCreated ChangeLogDeleted AppID UsesConfigurationOfAttributeSet AlwaysShareConfiguration
39 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 20 NULL 1 NULL 1
49 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 21 NULL 2 39 0
79 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 28 NULL 3 39 0
110 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 35 NULL 4 39 0
140 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 38 NULL 5 39 0
176 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 47 NULL 6 39 0
264 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 72 NULL 9 39 0
294 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 81 NULL 10 39 0
333 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1379 NULL 11 39 0
390 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1409 NULL 13 39 0
419 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1470 NULL 14 39 0
474 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1476 NULL 16 39 0
503 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1479 NULL 17 39 0
533 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1513 NULL 18 39 0
559 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1514 NULL 19 39 0
589 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 1516 NULL 20 39 0
649 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3067 NULL 22 39 0
678 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3072 NULL 23 39 0
760 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3085 NULL 24 39 0
792 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3094 NULL 25 39 0
888 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3341 NULL 28 39 0
920 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3360 NULL 29 39 0
984 DataPipeline DataPipeline System Describes a set of data sources and how they are interconnected. 3381 NULL 31 39 0

Technically you should have one such entry per App. The ID of the row, which has your appid in it (6) should be the one you would have wanted in the url.
Aug 26, 2015 at 8:39 AM
That's interesting - no entries at all, for any app, in the AttributeSets table for DataPipeline. That's the case on two installs I've checked.
Aug 29, 2015 at 6:42 PM
I have exactly the same problem and it is happening on 2 different machines where I installed DNN. The only telltale sign something is going wrong happens when I go to install apps - I regularly get error messages about SetAttribute and when I check the databases I get the same results: no entries at all in the AttributeSets table for DataPipeline.
This is blocking a major project for me. Looking at the source of 2sxc after reading this thread has given me some ideas of where to look so I am going to take a closer look to see what I can do about this but if anybody has a fix or an idea where this is coming from that would be awesome.
Aug 29, 2015 at 9:10 PM
Now you mention it o get those same errors on some app installs.
Aug 29, 2015 at 10:41 PM
I am not sure exactly why this happens but looks like the AttrubuteSet for DataPiepeline is missing and that appears to be the root of the problem.
Seems to me that the initial installation of 2sxc must have missed something. Any ideas would be appreciated but I am looking into it on my own to see if I can figure it out.
Aug 29, 2015 at 11:51 PM
Edited Aug 30, 2015 at 5:53 PM
I found the bug that causes this happen and I have a workaround to get it all working.
If you install the latest module (7.2.2) from scratch with no previous installation of 2sxc at all the DataPipeline components won't be installed. If you look at the source code the only place where those components seem to get installed is during an upgrade from version 6. I might be missing something around that cause but I have verified what happens and discovered a simple fix that should work for anybody else who has the same problem:
  1. Uninstall both modules (App and Content)
  2. I also deleted the folder ToSIC_SexyContent from DesktopModules as well as the 2sxc from the portals but I don't think that matters too much
  3. Install versions 6.06.04 (https://github.com/2sic/2sxc/releases/download/v06.06.04)
  4. I then dropped App on a new page just to make sure everything worked but that too is probably not needed
  5. Now go a head and installed the latest module version. That will trigger the upgrade logic and specifically it will cause the function SexyContentModuleUpgrade.EnsurePipelineDesignerAttributeSets() to get called and that is the only place I found where the DataPipeline entries in SetAttributes get created.
That seems to do it. I downloaded the 2sxc app "Tutorial Query - Discover Visual Query" to test it out and sure enough problem solved.
Definitely a bug in the installation process but it's a pretty simple workaround.
Aug 30, 2015 at 4:22 PM
Brilliant work! I'm unable to verify today but sounds like you got to the bottom of it.
Aug 30, 2015 at 6:09 PM
Edited Aug 30, 2015 at 6:14 PM
Glad to be able to help. I just finished testing the workaround with my other server and I can now definitely confirm this procedure works but here is a slightly updated procedure now that I went through it cold on a QA server:
  1. Uninstall both modules (App and Content)
  2. Make sure you are NOT running a version of DNN higher than 7.4.0 (specifically DNN 7.4.1 has the but mentioned elsewhere and so far the beta builds of 7.4.2 seem to have the same bug)
  3. Delete the 2sxc folder in the root of you portal so that apps for 2sxc will setup correctly afterward.
  4. Install version 6.06.04 (https://github.com/2sic/2sxc/releases/download/v06.06.04) - this is important: using 6.06.05 or an earlier version results in missing the critical upgrade logic of the AttributeSets for the DataPipeline. I corrected my earlier reply to reflect this as well.
  5. Put the 2sxc app module on a page and initialize the control, making sure it works.
  6. Install the 7.2.2 2sxc module - it will upgrade the module and in the process will register the required AtrributeSets. You can verify this worked by trying the query mentioned in this thread on the database). If everything works you should have no error messages about missing AttributeSets.
  7. To make sure everything worked get the app "Tutorial Query - Discover Visual Query" from the 2sxc site. Go to the Admin pages for the app and then to the visual query designer and everything will work as expected.
Clearly either the scripts for the SQLProvider are missing something or the code that gets invoked in this specific upgrade path should also be called during a clean install. For my purpose this works and I logged the issue on GitHub. If I can find a little extra time to spare I will take a look at proposing a fix in the code but I had trouble getting the source to build the package and I don't have any more time to spend on this for now. If you are curious you can take a look at the file SexyContentModuleUpgrade.cs in the SexyContent folder. The UpgradeModule function only calls EnsurePipelineDesignerAttributeSets() on an upgrade from 6.6.0. or 6.6.04 and the AttributeSets that this method adds don't appear to get created anywhere else.

Hopefully this will help you and anybody else who runs into the same issue.
Coordinator
Aug 31, 2015 at 2:27 PM
Thanks for the through research!

this will help us get it fixed asap.
Coordinator
Sep 1, 2015 at 4:27 PM
Moving to Github https://github.com/2sic/2sxc/issues/322

It's a bug we apparently introduced in 7.2.2 - should release a fix tomorrow.
Marked as answer by 2sicDev on 9/1/2015 at 8:27 AM
Developer
Sep 2, 2015 at 10:39 AM
Thank you for your work, NexusAgent! I just released 7.2.3 which solves the issue. An upgrade from 7.2.2 to 7.2.3 will create the missing content types.
Sep 2, 2015 at 5:53 PM
Just upgraded to 7.2.3 and its fixed the issue nicely. Looking forward to using the Visual Query designer! Great stuff :)