Arctic
-
Posts
7 -
Joined
-
Last visited
Posts posted by Arctic
-
-
<div edit='4302.title,4302.link,4302.text'>edit</div>
I have a page with a list of other pages, and I'd like to make certain fields on each page front-end editable in a single dialog window (in this example, only title, link and text). However, in this example I only get the title field when I click edit. Is there a way to do this?
Thanks!
-
On 10/15/2021 at 5:43 AM, adrian said:
IMPORTANT ALERT!!!
Hi everyone,
I had a site today that was loading really slowly for the first view for guest users. Turns out the https://restcountries.eu API that this module uses to determine if the user is in Europe is down at the moment, so loading of the site was waiting on a timeout from the failed call to the API.
Now obviously the correct thing to do is for this part of the module (if enabled) to make this call asynchronously via AJAX so that it doesn't impact the loading of the site.
The logic also needs to be updated so that the banner is also displayed if it can't find the visitor's region. At the moment it only works as a fallback if it can't get their IP address, which is obviously not very useful if the APIs are down.
I had this same problem with sites suddenly timing out or taking 30 seconds or more to load, and I just could not figure it out. I ended up unchecking the EU users option (sorry rest of the world) and finally things are back to normal.
-
Resolved: Removed the additional classes from init AND all whitespace around the processwire namespace declaration.
Hi all,
I'm using option 1 here for multiple sites with multiple databases: https://processwire.com/docs/more/multi-site-support/
Site 1 (the main site) works fine. When I try to log in to Site 2, I hit a blank page after login. The front end works fine. Here's the debugging info:
- Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/site-2/init.php:138) in /home/****/public_html/wire/modules/Process/ProcessPageView.module on line 142
- Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /home/****/public_html/wire/core/Session.php on line 874
- Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/site-2/init.php:138) in /home/****/public_html/wire/core/Session.php on line 886
The extra lines in init are just classes, removing them doesn't change the error.
Any ideas?
-
Same here, I ended up rolling back to an earlier version of PW to import pages. I hope it can be updated; it's a really useful module.
- 2
-
Thanks, that helped! Here's what worked in the end.
$allFields = $page->getFields(); foreach ($allFields as $related){ if (strpos($related, 'related') === 0) { //get just the fields that start with related foreach ($related as $tag){ echo "<a href='$tag->url'>$tag->title</a>"; } } }
- 2
-
Hello! I suspect I'm overlooking something simple, but I'm trying to loop through several page reference fields at once. However, this only returns results from related_1.
$tags = $page->getFields('name=related_1|related_2|related_3'); foreach($tags as $tag) { echo "<a href='$tag->url'>$tag->title</a>"; }
Front-end edit of multiple fields on another page
in API & Templates
Posted
Thanks! Unfortunately, that doesn't work. If there's more than one field it ignores the page attribute and looks for them in $page instead. It does work with a single field, though.
Edit: Hold on, that does seem to be working now. Weird. Thanks!