Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure multi-language pages are created with all language status fields set to 1 #857

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
Expand Up @@ -702,4 +702,4 @@ class InputfieldPage extends Inputfield implements ConfigurableModule {



}
}
4 changes: 3 additions & 1 deletion wire/modules/LanguageSupport/LanguageSupportPageNames.module
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,9 @@ class LanguageSupportPageNames extends WireData implements Module, ConfigurableM
$page = $event->arguments[0];
$extraData = $event->return;
if(!is_array($extraData)) $extraData = array();
$alwaysActiveTypes = array('User', 'Role', 'Permission', 'Language');
// 2015-01-07: add Page to the list to
// match default behaviour in hookInputfieldPageNameRenderAfter for API-based page creation
$alwaysActiveTypes = array('User', 'Role', 'Permission', 'Language', 'Page');

foreach(wire('languages') as $language) {
if($language->isDefault()) continue;
Expand Down