0

I have taken the Blog App, added a Category ContentType as a field in the BlogPost ContentType and built a query to factor Category into the results.

But I am having trouble with the In-ValueProvider. Following the example here the Visual Query Designer seems to be ignoring the incoming value from my ModuleDataSource.

My Visual Query

I have double checked the In-Stream name, my Entity names, case, TestParameters, etc. Are there any known bugs in 2sxc 8.44 and up that would cause this issue? What have I missed?

In this case I am using a RelationshipFilter. Relationship is "Category". Filter is "[In:Config:Category]". I can switch out to a [Querystring:Category] and that works fine and runs all my code.

Thanks for reading.

MDM
  • 897
  • 6
  • 12

1 Answers1

0

OK I found a workaround.

It turns out that the In-ValueProvider is working but it's struggling with the Category of my BlogPost I think because Category is an entity.

For background I have a BlogPost ContentType, a Category ContentType, and an Articles Home Header ContentType. Articles Home Header sets both the header info for the articles page and the Category entity.

For some reason the RelationshipFilter is having trouble comparing the Category entities between Articles Home Header and BlogPost. I tried the following for my Filter and neither worked:

[In:Config:Category]

[In:Config:Category:Title]

I wonder if this is a case sensitivity issue, a bug, or if I am just misunderstanding the filter syntax.

To work around I created a temp field called TempCategory in my Articles Home Header and used [In:Config:TempCategory] for the filter.

That worked.

For reference here is a snippet from the Query:

{
  "Config": [
    {
      "Title": "Coaching Articles",
      "SubTitle": "",
      "Image": "/Portals/0/uploadedimages/AcademicPrograms/Christ_College/crosswise-hero.jpg",
      "ImageAlt": "Crosswise stained glass",
      "Category": [
        {
          "Id": 2716,
          "Title": "Coaching"
        }
      ],
      "Id": 3118,
      "Modified": "2016-06-21T10:44:21.9Z",
      "_2sxcEditInformation": {
        "sortOrder": 0
      }
    }
  ],
  "Paging": [
    {
      "Title": "Paging Information",
      "PageSize": 10,
      "PageNumber": 1,
      "ItemCount": 0,
      "PageCount": 0,
      "Id": 0,
      "Modified": "0001-01-01T00:00:00Z",
      "_2sxcEditInformation": {
        "entityId": 0,
        "title": "Paging Information"
      }
    }
  ],
,
  "Default": [
    {
      "Title": "Protect Your Players and Your Program: An Athletic Leader's Legal Duties",
      "UrlKey": "an-athletic-leaders-legal-duties",
      "PublishingGroup": null,
      "PublicationMoment": "2016-06-15T00:00:00Z",
      "Image": "/Portals/0/uploadedimages/AcademicPrograms/Graduate/Coaching/an_athletic_leaders_legal_duty.jpg",
      "ImageSquare": false,
      "Teaser": "<p>When the clock started on the new year earlier this month, all but one state joined the growing legal effort to protect and prevent concussions and head injuries among America&rsquo;s young.</p>",
      "Body": "<p><strong>When the clock started on the new year earlier this month,</strong> all but one state joined the growing legal effort to protect and prevent concussions and head injuries among America&rsquo;s young.</p>\n<p>As sports-related injuries and issues continue to dominate the headlines and influence programs throughout the country, laws like &ldquo;return-to-play&rdquo; are becoming a sign of the times when it comes to protecting players and athletic programs alike. The world of athletics is experiencing a significant shift in the perception of the roles and responsibilities of coaches, schools and athletic personnel.</p>",
      "DesignedContent": [],
      "Tags": [
        {
          "Id": 2576,
          "Title": "coaching"
        },
        {
          "Id": 2575,
          "Title": "management"
        },
        {
          "Id": 2574,
          "Title": "sports"
        },
        {
          "Id": 3035,
          "Title": "legal"
        }
      ],
      "Author": [
        {
          "Id": 3030,
          "Title": "Shaleek Blackburn"
        }
      ],
      "ImageAlt": "Referee holding a red",
      "Thumbnail": "",
      "ThumbnailAlt": "",
      "RelatedArticles": [
        {
          "Id": 2564,
          "Title": "Athletic Personnel's Duty To Warn"
        },
        {
          "Id": 2565,
          "Title": "Get A Better Grip On Bullying"
        },
        {
          "Id": 2717,
          "Title": "Good Coaching Develops Exceptional Athletes and People"
        }
      ],
      "Category": [
        {
          "Id": 2716,
          "Title": "Coaching"
        }
      ],
      "ArticleRelationships": null,
      "Id": 2513,
      "Modified": "2016-06-15T19:32:17.913Z",
      "_2sxcEditInformation": {
        "entityId": 2513,
        "title": "Protect Your Players and Your Program: An Athletic Leader's Legal Duties"
      }
    }  
  ]
}
MDM
  • 897
  • 6
  • 12
  • I think this is just something that wasn't implemented in this detail yet – iJungleBoy Jun 25 '16 at 09:25
  • Thanks for the note. I was wondering if many to many comparisons for the In-ValueProvider might simply not be coded yet. That's OK. We appreciate all you guys are doing. – MDM Jul 13 '16 at 17:59