Skip to content

Commit

Permalink
Merge branch 'hotfix-3.3.2' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Jul 12, 2022
2 parents 9eb4afa + 1844a5e commit 26c523a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v3.3.2

* [#62](https://github.com/pixl8/preside-ext-data-api/issues/62)- Fix issues with bad content renderers for data with page links

## v3.3.1

* [#61](https://github.com/pixl8/preside-ext-data-api/issues/61) - Fix bad i18n keys being used for documenting field descriptions
Expand Down
2 changes: 2 additions & 0 deletions handlers/renderers/content/DataApiPageLink.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ component {
if ( pageId.len() ) {
return event.buildLink( page=pageId );
}

return "";
}
}
2 changes: 1 addition & 1 deletion handlers/renderers/content/DataApiPageLinkArray.cfc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
component {

private string function default( event, rc, prc, args={} ){
private array function default( event, rc, prc, args={} ){
var pages = ListToArray( args.data ?: "" );

for( var i=1; i<=pages.len(); i++ ) {
Expand Down
14 changes: 10 additions & 4 deletions services/DataApiService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,19 @@ component {
}

if ( $getContentRendererService().rendererExists( renderer, "dataapi" ) ) {
var renderedContent = $renderContent( renderer, arguments.value, "dataapi", arguments.fieldSettings );
if ( Len( renderedContent ?: "" ) ) {
return renderedContent;
try {
var renderedContent = $renderContent( renderer, arguments.value, "dataapi", arguments.fieldSettings );
if ( Len( renderedContent ?: "" ) ) {
return renderedContent;
}
} catch( any e ) {
$raiseError( e );
}

}

if ( Len( arguments.value ?: "" ) ) {
return arguments.value;
}
return $isFeatureEnabled( "dataApiUseNullForStrings" ) ? NullValue() : "";
}

Expand Down

0 comments on commit 26c523a

Please sign in to comment.