Jennifer Stock Posted June 29, 2022 Share Posted June 29, 2022 Hi. I'm working on converting a small site to run as an instance of my main PW install, so it can live in a different web root and be addressed by a different domain name. I'm finding a few things to be different in the multi-instance environment: $page->field->url does not include the file name along with the path, as it does in a traditional environment date fields are not being translated into the specified format repeater events are being shown whether or not they are marked as published Wondering if there is a pattern to what I'm seeing, and how best to address it. I've found a work-around for the first item, and the second item seems manageable, but I don't know what to do about the repeater issue. Link to comment Share on other sites More sharing options...
Gideon So Posted June 30, 2022 Share Posted June 30, 2022 Hi @Jennifer Stock I am not sure I understand your situation. Do you have 2 ProcessWire sites which live in different folders. You want to access site B web data in site A? Do you set up ProcessWire multi-instances in site A? Gideon Link to comment Share on other sites More sharing options...
Robin S Posted June 30, 2022 Share Posted June 30, 2022 It sounds like output formatting is off for the page in question. I haven't used multi-instance so I'm not sure if it's normal for pages retrieved this way to have output formatting off by default or if it's a bug. But you can turn output formatting on for your page like this: // $p is your page from the other instance $p->of(true); // Now output field values from $p 2 Link to comment Share on other sites More sharing options...
Gideon So Posted June 30, 2022 Share Posted June 30, 2022 Hi @Robin S You are right. The output formatting is off if pages are pulled from another ProcessWire instance. I am not sure whether it is intentional or a bug. For me it is not intuitive to use. Gideon 1 Link to comment Share on other sites More sharing options...
Jennifer Stock Posted June 30, 2022 Author Share Posted June 30, 2022 Interesting. I can't get $page->of() to work for the page as a whole, but I am able to use $page->getFormatted() successfully on individual fields. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now