Jump to content

Tyssen

Members
  • Posts

    353
  • Joined

  • Last visited

Everything posted by Tyssen

  1. No, the old module doesn't have any fields. The only thing I can do is uninstall it. And I can't even do that because when I try I get:
  2. @zoeck the parent page and its children aren't hidden and none of them have a sitemap_ignore field added to them.
  3. I've inherited site that uses Markup Sitemap XML for generating the site map but there's a certain group of pages that are missing from it and I can't figure out why. There is a checkbox field for hiding pages from the sitemap but it's not actually assigned to any templates. There is no sitemap-xml.php file or anything like that. I've looked in ready.php and there's nothing in there related to sitemaps. Where else should I look?
  4. https://processwire.com/modules/rock-frontend/ under example _main.php
  5. @bernhard that looks cool, I'll check it out more closely. BTW, https://github.com/baumrock/RockFrontend/blob/main/profiles/rock/files/site/templates/_main.php is 404.
  6. Does anything like https://github.com/clubstudioltd/craft-asset-rev exist for PW? I create a manifest.json file using my build process, which contains code something like {"css/app.css":"css/app-65445d4baa.css","js/app.js":"js/app-889f5dca36.js"} and then in the template I'd have {{ rev('css/app.css') }} which replaces that with whatever is in the manifest file.
  7. So no way to do it without having to fiddle around with extra fields? It's not that important if the field still shows, so if there's not a simple straight forward to do, I'll leave it as is.
  8. Yes, that's what I've already been looking at. What I don't know is what selector to put in the show-if dependencies field. If it was a checkbox it would be checkbox_field=1 but I don't know what the format should be for repeater matrix fields.
  9. That would be on the front end. I was talking about the field settings so that the old field doesn't show in the admin if the new field has content.
  10. I'm upgrading an old PW site which originally just had a single body field and now giving them a repeater matrix field which will allow more types of content. For the template, if the repeater matrix field has content I want to hide the old body field from the editor. What would be the conditional that I'd enter into the settings for the body field? I thought it might be something like matrix_content.count=0 but that doesn't work.
  11. Not necessarily. Page title might be terms and conditions, but you don't really want the page name being /terms-and-conditions/
  12. Yes, that was it, thanks. I'm not totally familiar with how the site is put together yet, but I think the issue may be that there are hard-coded links to some pages in templates.
  13. I've inherited a PW site that has something installed which forces changes to the page title field to update the page name field under the settings tab too, and vice versa. The site does have the Connect Page Fields installed but title and name aren't set as connected fields. It also has Custom Inputfield Dependencies installed but that doesn't look like it would do this. Anyone have any other ideas what might be causing it? Because I'd like to turn it off.
  14. Sorry, my memory's not great and I have no idea which project this relates to now. Although it probably involved not using the module in the end and doing a more manual process.
  15. Actually, it seems like probably something else going on with my set-up. I changed some things to fix a different problem, tried re-enabling Tracy, and it's fine now.
  16. I should mention that I get that error in the admin area. If I disable Tracy and then change PHP version to 8, then the admin works OK.
  17. When changing PHP from 7.4 to 8.0 I get this error pointing to line 1155 of TraceyDebugger.module.php: if(in_array('titlePrefix', $this->data['styleAdminType'])) Opening the call stack says that $haystack = 'default'. I'm running PW 3.0.210 with Tracy 4.24.3. Not sure whether this is a problem with the module itself or something else in the site.
  18. It turns out that this was the missing piece: curl_setopt($cURL, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0');
  19. Yes, I get successful output with that. Still get 500 with your updated code on my URL.
  20. The PW site will ultimately be the target. Once I have access to the data in PHP I'll be using it as a variable which will then be handed off to Twig templates. The source is already in JSON format.
  21. I've moved it out of PW for now and it's just a plain PHP file in the root of the public folder. I wanted to eliminate PW as being a possible cause of the problem. So what I've posted so far is literally all there is.
  22. Thanks @flydev I've tried your code and get a 500 error which I really don't understand. Since posting this, I found https://reqbin.com/curl and when I test my API URL, it works fine and I can see the same output as if I visit the URL directly in a browser. That site gives you the option to generate code in different languages. The PHP code it generates is essentially what I already have. If I use the js/AJAX code it suggests, I can see the response printed in the console. 🤔
  23. Although not strictly a Processwire question, I am trying to do this on a PW site, so… I have the following code: $url = 'https://json-api-url-domain.com/matches?id=XX&division=YY&teams=[ZZ]'; $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL, $url); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Accept: application/json' )); $result = curl_exec($cURL); curl_close($cURL); $json = json_decode($result, true); var_dump($json); But with that I'm getting: array (size=2) 'name' => string 'TypeError' (length=9) 'message' => string 'Cannot read properties of undefined (reading 'includes')' (length=56) I get the same message if I var_dump $result. I can visit the API URL directly in a web browser and see the JSON response. Any idea why that is and how do I fix it?
×
×
  • Create New...