Jump to content

alexcapes

Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by alexcapes

  1. Thanks @netcarver I'll update here on progress. The situation was that we had all our DNS on an old hosting company — I set this account to be closed and copied over all the DNS records to our new hosts (DigitalOcean). However the old account was taken offline earlier than expected so the TTL values are all high and so everything needs to propogate. Couple that with being locked out of DigitalOcean because I can't verify my login, means I'm stuck waiting to see if this all works out and everything comes back. Life lesson: switching anything to do with DNS should be done with great care and planned for. It's not nice when everyone is looking at you as why their email stopped working and there's nothing to do but... wait.
  2. Ok so I think my panic on hsts was a little misguided. What seems to be the issue was transferring DNS records over to a new hosting company which has not happened seamlessly. ?
  3. Hi, I enabled hsts in the new .htaccess file in latest version of PW (as described here https://processwire.com/blog/posts/pw-3.0.135/#step-4-decide-whether-to-to-enable-hsts-section-9f) Everything seemed okay but realised my subdomains had gone offline ('This site can’t be reached') and now both our main business website has gone offline and our emails (done through Google Apps) have stopped working). Could hsts be responsible for all this? I removed the new .htaccess and now have the old one, I also tried resetting Chrome to remove the hsts domains but nothing works. Funnily I can't access our hosting now (Digital Ocean) because I have no access to my email. Please can any help shine a light on this? Can hsts be this dangerous?!
  4. Running PHP 7.3.1 with the latest version of Jumplinks return a blank page for me. PHP 7.2.14 seems to work fine.
  5. Hi, I've been invited by Apple to use their 'News' service for a publication in the UK. https://www.apple.com/uk/news/ A number of CMSs already have plugins to publish content via the API, however Processwire is not one (yet!) https://newsresources.apple.com/en/faq/66346243 It's slightly beyond my technical abilities but would be very interested in anyone that is willing to look at developing a Processwire Module. (for reference here is the Apple News API documentation) Update: Chapter Three have created a PHP Apple News library here https://github.com/chapter-three/AppleNewsAPI
  6. Digging a bit (and by that I mean actually looking at the source!) it looks like this is not a SmartyPants issue. I can see that the double quote is being encoded by Processwire incorrectly as a right double quotation mark. <p class='review'>&#8221;<i>How Music Works </i>is a melange of bookish musings on how music is shaped by the places it is played and the technology used to create and disseminate it”<br/><span class='review-source'>Danny Eccleston<br/><em>mojo</em></span> However the data source for this content (an XML file) the quotes look just to be normal double quotes <Text><![CDATA["<i>How Music Works </i>is a melange of bookish musings on how music is shaped by the places it is played and the technology used to create and disseminate it"]]></Text> So I'm not sure why Processwire would encode (incorrectly) the first double quotation mark (if before an HTML tag) and no others?
  7. Hi, I have an issue when using the SmartyPants Typographer text formatter. If the text has an HTML tag (such as italics) straight after the quotation mark, it reverses it. So for example: This only seems to occur when an HTML tag is placed at the beginning. Does anyone know how this could be corrected?
  8. This would be for super-users only as last resort to fix mistakes. I think using 'Version Control' may be a workable solution although it does feel a little like using a sledgehammer to crack a nut - I don't really need/want version control and it might add too much complication for the client - and I only need this 'restore' option on one single pagetable field. Just to note I don't think changelog offers any way to 'restore' the a previous state of a field. *Update* Version Control can be switched on for specific fields only so I think this is going to be a workable solution for me. Thanks @Robin S *Update #2* Looks like Version Control is not compatible with PageTable fields.
  9. Thanks @Robin S I'll have a play around and see if I can get something working.
  10. RT @processwire: New post: Building the Canongate website with ProcessWire, by Alex Capes @alexandercapes – https://t.co/kH9VBPwMAu

  11. I wonder how difficult it would be to store the relationship info somewhere else and then add the page back to the PageTable if restored? Do you think it's doable with a simple module?
  12. Hi, I've noticed when I trash pages from a PageTable field, then restore them, they are restored to their original location, however the connection is broken with the PageTable field. Is this expected behaviour? Is there a way for it to maintain this relationship? Otherwise restoring it doesn't actually restore it to it's previous state. Note that in this case the parent pages for the PageTable field is not set as the direct parent.
  13. Hi, I just updated a site to 3.0.61 and it's breaking uploading images from a URL via the API. I get the following error: Recoverable Fatal Error: Method ProcessWire\Pageimage::__toString() must return a string value The code getting the image is very simple: $new_edition->work_cover = $cover_url; $new_edition->save('work_cover'); It works fine on 3.0.42 but returns the error on 3.0.61
  14. I've updated my code to remove ? ( ) from the selectorValue $q = preg_replace('/[?()]/', '', $q); However I wonder how many other characters may possibly break the search and whether there's a better way to sanitize?
  15. Hi, I have a site search working correctly on a project, however I seem to be having issue when the search term contains characters such as question marks or brackets. I'm doing the following... $q = $input->get->text('q'); if($q) { $input->whitelist('q', $q); $q = $input->get->selectorValue('q'); } $matches = "search_cache~={$q}, sort=-publish_date"; This works correctly for everything except searches that include characters such as ? or ( ) So for example a searches for the following (where the page title is "example title?") example title example title? The first one works as expected and the second returns 0 results. As the titles are very specific for a user to search, I need to make sure the search works with these kind of characters. How can I make sure search works with these kind of characters?
  16. @Robin S you're my hero again for this module! Seriously every time I think of something I need in PW you're already on it.
  17. Thanks @adrian. For those looking for this module, it's still here https://github.com/ryancramerdesign/ServicePages but needs a few small updates to work with PW 3+ (see above thread).
  18. Did it get removed completely? http://modules.processwire.com/modules/service-pages/
  19. I should probably have known this (learn something new on PW everyday...) Thanks Adrian - all working correctly now.
  20. <?$work_pages = new PageArray();?> <?$project_1 = $pages->get("parent=/work/projects, limit=1, sort=sort"); $work_pages->add($project_1); // Code for Project 1 goes here $project_2 = $pages->get("parent=/work/projects, id!=$work_pages, limit=1, sort=sort"); $work_pages->add($project_2); // Code for Project 2 goes here $project_3 = $pages->get("parent=/work/projects, id!=$work_pages, limit=1, sort=sort"); $work_pages->add($project_3); // Code for Project 3 goes here // etc I have the above code which gets project pages then adds the project to an array to exclude from the next selector. I'm sure this was working fine but seems to have started including unpublished pages - if I unpublish or hide pages they still show up. I've done some troubleshooting and have excluded any caching issues - the code is definitely pulling in unpublished pages. Working on Processwire 2.8.35.
  21. Thanks @Robin S - fixes the issue for me.
  22. Nice, thanks! Just updated it and working perfectly for me.
  23. @Robin S I think I've found an issue with the module. It seems to stop image fields from working correctly. When I upload images now I get a thumb + spinner but the spinner never stops. This is what I see in the inspector: Uncaught SyntaxError: Unexpected token < in JSON at position 0(…) parseJSON @ JqueryCore.js?v=1479135253:2 (anonymous function) @ InputfieldImage.min.js?v=119-1479135253:1 When I uninstall the module, image fields work as expected again.
  24. I got what I needed working using RuntimeMarkup. Basically I needed to have two field values (book name and authors) from the containing page of a PageTable field page copied to the PageTable field page. These fields are needed to display in the Page field where you can select the 'featured' quote. Without the two fields in the dropdown you just have the quote which needs the context of the author and book name.
×
×
  • Create New...