I'm using the Page Reference Field in a multilanguage Site. When the admin creates a new page through the field option on the template, the page is created without activate the secondary language.
I've found this pretty old workaround (that works):
https://github.com/ryancramerdesign/ProcessWire/issues/889
(in the current version, the hook goes on the row 884 of InputfieldPage.module):
// ======================================================
// Hook to create new pages with languages active :
// ======================================================
$trimmed_title = trim($title);
$languages = wire("languages");
foreach($languages as $lang) {
$page->title->setLanguageValue($lang, $trimmed_title);
$page->set("status$lang", 1);
}
// ======================================================
I wonder if I'm making any mistake and there is some lost configuration.
I suggest to enable the possibility to give the multilanguage field for the title when creating a new page through the page reference field.
(I'm using ProcessWire 3.0.123)
thanks
Alex