-
Posts
126 -
Joined
-
Last visited
Everything posted by antknight
-
Shared host has updated PHP? and broken PW site
antknight replied to antknight's topic in General Support
All sorted. They hadn't enabled the extension. -
Shared host has updated PHP? and broken PW site
antknight replied to antknight's topic in General Support
-
Shared host has updated PHP? and broken PW site
antknight replied to antknight's topic in General Support
OK it turns out they are using a terrible host. No way to select PHP version (the site is on PW2.3 so this is OK). But also no way to enable extensions. I will contact the host again. Thanks for your help, stay tuned.... -
Shared host has updated PHP? and broken PW site
antknight replied to antknight's topic in General Support
-
A site I built a few years ago has been down for a few days. I haven't had much joy from the hosting support. It seems they have updated something which results in a 500 internal server error. This is what they have said: I have taken a look at your ticket. From what I can see my colleague has already advised you that due to the TLS 1.0 and TLS 1.1 being on end of life we've had to update all of our servers which were not compliant to at least PHP version 5.3 in order to support TLS 1.2 and all of the traffic is now only using TLS 1.2. I am terribly sorry but afraid that due to this update the PHP extension from the error log is no longer present on the server and there is no known workaround. See attached for error log Processwire debug output: Fatal error: Exception: Required PDO class (database) not found - please add PDO support to your PHP. (in /home/jimm8669/public_html/wire/core/ProcessWire.php line 143) #0 /home/jimm8669/public_html/wire/core/ProcessWire.php(51): ProcessWire->load(Object(Config)) #1 /home/jimm8669/public_html/index.php(185): ProcessWire->__construct(Object(Config)) #2 {main} in /home/jimm8669/public_html/index.php on line 216 Is this something I can fix or is it the hosting? Thanks error_log phpinfo().htm
-
I am after a bit of guidance on importing content to ProcessWire. I am using a program called Clarify to generate work instructions. I would like to use ProcessWire to put together a knowledgebase of work instructions. I have Clarify outputting an HTML file and a folder of images for each work instruction which I would like to become a page in PW. An example of the HTML output is attached. How can I import these pages and the folder of images and keep the image links intact? Many Thanks Anthony clarify-example.zip
-
Setup > Templates and Setup > Fields menu links not working
antknight replied to antknight's topic in General Support
Working from another computer I replaced the .htaccess with a fresh copy and it appeared to fix the problem. Unfortunately, I didn't confirm the problem existed on that computer too before replacing the .htaccess Back on the original computer the problem persisted but was resolved by clearing the Chrome cache. So I coudn't be 100% on the exact cause. Never mind Thanks for your help -
Setup > Templates and Setup > Fields menu links not working
antknight replied to antknight's topic in General Support
You are probably right. I had just tried to force a higher php version by adding a handler to the .htaccess using the cpanel file manager...probably not the best idea. This was just after trying to run ProcesWire Upgrade (only to be told I can't upgrade) I will check the logs when I am next near my computer and report back -
Hi guys I have a strange problem here on a slightly older site running 2.4.0 (can't upgrade because hosting for that site doesn't offer php 5.3+) In the admin, when I try and use the Setup > Templates or Setup > Fields links a) The dropdowns show no templates or fields b) When you click the link a file called simply 'download' is downloaded to my computer which when you open it is appears to be a PW php file, bootstrap? Can anyone explain this? Thanks Anthony
-
Newly installed pw cannot login admin area
antknight replied to metroroland's topic in Getting Started
Can I suggest you try MAMP for Windows instead? Then navigate to C:\MAMP\conf\apache Find where it says: # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None And change it to: # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All Then restart your MAMP servers I wrestled with XAMPP but MAMP just works! More info here: https://processwire.com/talk/topic/4434-pw-not-installing-correctly-admin-not-found/ -
Would it be a good idea to have ProcessWire registered with http://bower.io/?
-
PW not installing correctly - admin not found
antknight replied to Jamie Gordon's topic in Getting Started
If anybody has just installed MAMP and is getting the problem whereby you can access the homepage of a fresh PW installation but no other page or the admin area, one solution that has worked for me: OSX: Navigate to /Applications/MAMP/conf/apache and open the file called httpd.conf or Windoze: C:\MAMP\conf\apache Find where it says: # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None And change it to: # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All Then restart your MAMP servers Hope that helps- 27 replies
-
- 2
-
- admin
- processwire
-
(and 3 more)
Tagged with:
-
I am currently using the RCD map class by Ryan (see post 18 of this thread) which happily accepts anchor tags for the marker URL like so: $js .= "\nRCDMap.addMarker('{$marker->title} ({$marker->parent->title})', '#{$marker->parent->title} {$marker->title}', {$marker->map_marker->lat}, {$marker->map_marker->lng});"; How do I achieve the same with MarkupGoogleMap as the markerLinkField only accepts a page field? Thanks! UPDATE: Managed to do it using http://modules.processwire.com/modules/fieldtype-concat/
-
Arrrrr, it was my own stupidity. The content was outside the conditional. You were exactly right there was nothing in the array so why should it get displayed? Thanks!
-
I have tried that but I am not sure where to put it, I still get the conditional content regardless. Here is my code snippet, I know it's messy with all those unnecessary echos... <?php foreach ($page->tags as $tag) { $related_pages = $pages->find("template=product|product-2, tags=$tag"); foreach ($related_pages as $related) { if ($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); // We limit it to 4 related pages at max $related_id = array_slice($related_id, 0, 4, true); foreach ($related_id as $key => $val) { $rp = $pages->get($key); $first = $rp->gallery->first(); $thumb = $first->gallery_image->size(780, 600); echo "<div class='col-27"; foreach ($rp->tags as $tag) { echo " {$tag->name}"; } echo "'>"; echo "<article class='project'>"; echo "<figure class='project-thumb'>"; echo "<img src='{$thumb->url}' alt='project-1'>"; echo "<figcaption class='middle'>"; echo "<div>"; echo "<a href='{$rp->url}' class='icon circle medium'><i class='fa fa-link'></i></a>"; echo "<p style='color:white'>{$rp->page_heading}</p>"; echo "</div>"; echo "</figcaption>"; echo "</figure>"; echo "<header class='project-header'>"; echo "<h4 class='project-title'><a href='{$rp->url}'>{$rp->title}</a></h4>"; echo "</header>"; echo "</article>"; echo "</div>"; } ?>
-
Actually there is one more thing, how can I make it conditional so it only outputs content if there are in fact related pages? foreach($page->tags as $tag) { $related_pages = $pages->find("template=article, tags=$tag"); foreach($related_pages as $related) { if($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); // We limit it to three related pages at max $related_id = array_slice($related_id, 0, 3, true); foreach($related_id as $key => $val){ $rp = $pages->get($key); echo //Conditional stuff here...
-
Thanks for that Pete, I agree that approach is simpler but it is not a simple sort I am after. To quote an earlier post I want it to look for pages with the same tags and the more tags are shared, the more "related" the other page is, thus getting it further up on the list. So I tried the snippet apeisa posted and it works! I adapted it for my needs obviously. Thanks everybody for your help. The answer I was looking for was here all along foreach($page->tags as $tag) { $related_pages = $pages->find("template=article, tags=$tag"); foreach($related_pages as $related) { if($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); // We limit it to three related pages at max $related_id = array_slice($related_id, 0, 3, true); foreach($related_id as $key => $val){ $rp = $pages->get($key);
-
Hmmm Before I added the array_slice I got all the related pages correctly, when I add the array_slice I get 4 results but they are the current page, the home page, /processwire/ and /processwire/page/ foreach ($page->tags as $tags) { $tag = $sanitizer->selectorValue($tags->title); $related_pages = $pages->get("/products/")->find("tags.title=$tag"); foreach ($related_pages as $related) { if ($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); foreach ($related_id as $key => $val) { $rp = $pages->get($key); foreach ($page->tags as $tags) { $tag = $sanitizer->selectorValue($tags->title); $related_pages = $pages->get("/products/")->find("tags.title=$tag"); foreach ($related_pages as $related) { if ($related->id != $page->id) $related_id[$related->id]++; } } arsort($related_id); $related_id = array_slice($related_id, 0, 4); foreach ($related_id as $key => $val) { $rp = $pages->get($key);
-
Sorry I probably wasn't clear, I would like to limit to the top 4 related pages. If I use your suggestion won't it limit before sorting?
-
Hi guys, Sorry to drag up an old thread but this is probably the best place for it. I have implemented Thomas' code but I need to put a limit on the number of pages returned as I only have space for 4 in my markup. I have tried putting the limit selector in various places but I always get an error. Thanks Anthony
-
Actually I had the same problem. There are some syntax errors on the module page which I think catches a lot of people out. // removed by soma Missing ; after closing ) // removed by soma Missing , after 'xitem_current_tpl' => '<a href="{url}">{title}</a>' and missing ; after closing )
-
I was able to override the inline style by using : table[style] { width: 100% !important; }
-
I would quite like the ability to set table max-width to 100% so it doesn't spill outside the div. Even if I set max-width: 100%!important it doesn't override the inline style.
-
Thanks for taking the time Ryan, once again so simple.
-
I can't find anything similar in the forums. How would I grab all images from all the images fields from all pages?