@kohanajs/mod-cms
Advanced tools
Comparing version 5.4.2 to 5.4.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [5.4.3](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v5.4.2...v5.4.3) (2022-03-03) | ||
### Bug Fixes | ||
* language is null ([2006a13](https://gitlab.com/kohana-js/proposals/level0/mod-cms/commit/2006a132957df4245c48268e07f5d9350e538806)) | ||
### [5.4.2](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v5.4.1...v5.4.2) (2022-03-03) | ||
@@ -7,0 +14,0 @@ |
@@ -322,2 +322,3 @@ const {SQL} = require("@kohanajs/constants"); | ||
const tagDatabase = this.state.get(ControllerMixinDatabase.DATABASES).get('tag'); | ||
const languageDatabase = this.state.get(ControllerMixinPageLanguage.DATABASE); | ||
const livePages = await ORM.readBy(Page, 'id', [page.id], {database: liveDatabase, limit:1, asArray:true}); | ||
@@ -328,3 +329,3 @@ | ||
await HelperPage.defaultMasterValue(page, database, this.state.get(ControllerMixinPageLanguage.DATABASE)); | ||
await HelperPage.defaultMasterValue(page, database, languageDatabase); | ||
@@ -336,3 +337,3 @@ if(this.language !== KohanaJS.config.cms.defaultLanguage){ | ||
placeholders.blocks = HelperPage.blocksToObject(page.page_blocks, masterLanguage.id); | ||
await HelperPage.defaultLanguageValue(page, languageId, database); | ||
await HelperPage.defaultLanguageValue(page, languageId, database, languageDatabase); | ||
} | ||
@@ -339,0 +340,0 @@ |
@@ -223,4 +223,4 @@ const { ORM, KohanaJS } = require("kohanajs"); | ||
static async defaultLanguageValue(page, language_id, database){ | ||
const masterLanguage = await ORM.readBy(Language, 'name', [KohanaJS.config.cms.defaultLanguage], {database, limit:1 }); | ||
static async defaultLanguageValue(page, language_id, database, databaseLanguage){ | ||
const masterLanguage = await ORM.readBy(Language, 'code', [KohanaJS.config.cms.defaultLanguage], {database: databaseLanguage, limit:1, asArray:false }); | ||
const masterLanguageId = masterLanguage.id; | ||
@@ -227,0 +227,0 @@ //queue all fields |
{ | ||
"name": "@kohanajs/mod-cms", | ||
"version": "5.4.2", | ||
"version": "5.4.3", | ||
"description": "The CMS module for KohanaJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64396
1407