Skip to content

Commit

Permalink
Merge branch 'hotfix-1.2.2' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Mar 1, 2023
2 parents 5853c87 + 9a751dc commit d0d5ff1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.2.2

* [#13](https://github.com/pixl8/preside-ext-xml-sitemap/issues/13) - Announce interception point after writing to file

## v1.2.1

* Convert to github build system
Expand Down
1 change: 1 addition & 0 deletions config/Config.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ component {
settings.enum.sitemapChangeFreq = [ "inherit", "always", "hourly", "daily", "weekly", "monthly", "yearly", "never" ];

interceptorSettings.customInterceptionPoints.append( "postPrepareXmlSitemapPages" );
interceptorSettings.customInterceptionPoints.append( "postWriteXmlSitemapFile" );
}

}
4 changes: 3 additions & 1 deletion services/GoogleSitemapService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ component {
sitemap.append( "</urlset>" );

try {
FileWrite( expandPath( "/" & filename ), sitemap.toList( newline ) );
var content = sitemap.toList( newline );
FileWrite( expandPath( "/" & filename ), content );
$announceInterception( "postWriteXmlSitemapFile", { filename="/#filename#" ), content=content } );
} catch ( e ) {
if ( canError ) { arguments.logger.error( "There's a problem creating #filename# file. Message [#e.message#], details: [#e.detail#]."); }
return false;
Expand Down

0 comments on commit d0d5ff1

Please sign in to comment.