Jump to content

dragan

Members
  • Content Count

    1,466
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by dragan

  1. Can you upgrade to the latest Lister v1.1.2 β ?
  2. For the first time ever, I tried to play around with PW's new Google Client API module. Installation was successful. The basic example with Sheets API (reading content from a sheet) went well. However, writing to a sheet throws an error: // Google_Service_Exception #400 { "error": { "code": 400, "message": "Requested writing within range [Tabellenblatt1!A1:A2], but tried writing to column [B]", "errors": [ { "message": "Requested writing within range [Tabellenblatt1!A1:A2], but tried writing to column [B]", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT" } } I have used Ryan's example. The sheet gets created, but nothing else happens. Does anyone know what this error message means in plain English?
  3. To me, BEM + principles of Atomic Design + SASS is the way to go. I was quickly looking at that Tailwind page "extracting components". You can do exactly that with mixins. It's already there as a fundamental cornerstone of SASS. Why re-invent the wheel? And the M in BEM (modifier) gives you the flexibility you need without adding a truckload of utility classes or duplicating code. Also, if you want to just have a small, but very flexible layout (grid) SASS lib, I can highly recommend https://www.oddbird.net/susy/ Having said all that - I really really love the way you can use scoped CSS (SASS) inside Vue components. No chance of naming collisions, and you don't even need BEM anymore: Each CSS-rule lives in its own scope. What's actually finally rendered in the build will be named something else, but that doesn't matter. It just works. A great relief and time-saver.
  4. I guess this should be possible with a good old hook, too.
  5. For a long time, Twitter didn't care too much about a11y at all. Their most prominent open-source FE product Bootstrap wasn't all that accessible until v.4. With earlier versions, you'd have to use the Paypal a11y plugin for their JS components. I don't want to open another "Pandora box", but I recently wrote about accessibility and its many pitfalls on the web, and one of the points I made is that a blind faith in FE frameworks can be dangerous. Just because a framework/library is very popular, doesn't mean it's all "plug and play" and covers everything (you mean) it should. </sorry-for-slightly-derailing>
  6. Sure, why not? Perhaps you don't even need a module for this. Just some custom HTML with an anchor .pw-modal which opens your page. With one of the three "runtime markup" modules that would be easy to do, I guess: https://processwire.com/talk/topic/21982-rockmarkup-inputfield-to-easily-include-any-phphtmljscss-in-the-pw-admin/ (this is the latest one of this kind, afaik). Is your general goal to have something like a central image library for often-used assets?
  7. Welcome to the wonderful world of "modern" SPA frameworks (React et al) !
  8. I don't know if this helps, but in a simple test setup I got this to work: In the field settings "show only if..." > show only if custom PHP returns true: $rep = $page->textblocks; $c = $rep->count() -1; $last = $rep->$c; if($last->depth > 2) { return true; } Basically, I check the number of entries in a repeater called textblocks, then get the last (deepest) one, and check if depth is bigger than 3 (2, since it's zero-based).
  9. Did you try https://processwire.com/api/ref/page/num-parents/ ? edit: Actually, no. I was confused - the above seems to work with Matrix Repeaters, for regular repeaters depth should work.
  10. What do you mean with "custom template to add markup for images..."? The output is just XML. Why would one browser display another XML? That makes no sense. Do you mean "if logged in as superuser I see another XML as when not logged in"? Also, maybe you should have posted in the module support threads instead: https://processwire.com/talk/topic/799-module-xml-sitemap/ https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/
  11. Well, then just remove that line. If you're deleting, it makes no sense anyway.
  12. Well, does it work if you run it normally (not as cron job)? Do you get errors? What are the permissions of the page this runs in?
  13. @Hurme Did you check your server error logs for hints? Or site/assets/logs/ ? First of all, you could try to delete everything in site/assets/cache/modules/. If that doesn't work, rename the REST API module: prepend a dot (.modulename).
  14. I'm not sure, but maybe this is related: https://processwire.com/talk/topic/20006-module-restapi/?do=findComment&comment=176115 I guess that only superusers see such messages, and regular editors don't.
  15. Are you familiar with page reference fields? Are you already using them? Assuming you are already using them, I guess you want cross-references in both directions. In that case, take a look at this module: https://modules.processwire.com/modules/connect-page-fields/ From the API side, there's also this relatively new method: https://processwire.com/api/ref/page/references/
  16. I never had to deal with it myself, but check out Ryan's announcement.
  17. If it's just styling, you should first try a CSS-only solution. You can do a lot with just :nth-child or flexbox.
  18. I don't think that would make any impact on filtering and search. If anything, it would only make your setup more complicated than it needs to be. You would have to take care of creating year/month/day parent pages with each new record (or create them ahead of time).
  19. err, I should have googled this before answering... (I had no idea what ESP means). So it's data from one single weather station only? My above post was based on the assumption that you get weather infos from all over the world via some 3rd-party API and you update your site via cron jobs. It's been said time and again that a big number of PW pages will scale well, but a combination of (too many) fields, templates, and pages - plus complex queries - can seriously impact speed. In your case, the setup seems to be quite simple though, so I would go the "native PW route". However: When it comes to loading huge data-sets and visualise them (aggregate a 5-year-span of weather data and create statistics or curve diagrams), I would surely look for RockTabulator or some such. You can fake a future situation yourself with simply creating thousands of dummy data-sets.
  20. The majority (everything?) of the content is automated via imports, and you have practically no use for the whole PW admin backend? If so, I'd surely go the custom-mySQL-tables route. In PW, do your visualisation stuff (pulling raw data from mySQL). Perhaps you'd only have to build 1 page per location, and then use the location-page-id as a foreign key in mySQL. If you expect huge traffic, then a proper caching strategy would be essential. Do you plan to have some sort of search / filter on your site?
  21. @BFD Calendar It's certainly none of my business, but don't you want to optimize your site a bit? For starters, it takes ages to load. It's also not responsive. Your homepage is a whopping 24MB. You're loading JS in the <head> instead of the end of your <body> etc. The pattern backgrounds makes reading content hard. Images don't have an alt attribute. Google doesn't like slow and non-mobile-friendly sites, and chances are, your users won't either. https://search.google.com/test/mobile-friendly?id=Os-IXOq4pmJaFuqLUSb8xQ https://developers.google.com/speed/pagespeed/insights/?hl=de&url=https%3A%2F%2Fwww.birthfactdeathcalendar.net%2F The long homepage e.g. could make use of some lazy loading technique - it ain't that hard to do. I don't know what else is slowing down the site (TTFB is over 7 seconds, which is really bad)... maybe un-optimized PW selectors?
  22. Did you debug it with Tracy? Check whether you need parent or rootParent, and your template and field names.
×
×
  • Create New...