Jump to content

teppo

PW-Moderators
  • Content Count

    2,201
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by teppo

  1. teppo

    Link field

    Hi, Unless I'm misunderstanding something here, what you want is actually a Page field. In your template files you can output the URL of the selected page: <?php if ($page->page_field_name): ?> <a href="<?php echo $page->page_field_name->url; ?>"><?php echo $page->page_field_name->title ?></a> <?php endif; ?> Does that sound about right?
  2. @jmartsch, that's a public discussion on Adrian's profile page. So no, not really direct message -- two different things
  3. Thanks! The part in question would be this: "Taking into account the state of the art, the costs of implementation and the nature, scope, context and purposes of processing as well as the risk of varying likelihood and severity for the rights and freedoms of natural persons, the controller and the processor shall implement appropriate technical and organisational measures to ensure a level of security appropriate to the risk, including inter alia as appropriate [...]" GDPR doesn't state that the controller and the processor must encrypt all personal data, period. Loosely translated it says that, taking a lot of things (such as the cost, nature, scope, context, and purpose of data processing) they must take measures appropriate to the risk and its likelihood, and one of the measures that may be appropriate depending on a lot of factors would indeed be encryption. The truth to the matter is that unless there's a court case stating essentially that everything (including specifically email addresses) must be encrypted during storage, this can be interpreted in a multitude of ways. Then again, I'm still not a lawyer, and am mainly relying on opinions on the Internet – so don't take my word for it, and please do take every precaution you feel would be appropriate to your case
  4. Sadly the recordings are no longer available. For anyone interested, they will be available at wordpress.tv at some point. On a related note I think that's also a great source of information, even for non-WP users
  5. There is actually one benefit: if data is stored encrypted and the key is stored separately, even if it's on the same server, someone gaining illegitimate access to just your database but not full access to the server would mean that said data could be considered much less useful to the offending party. At the very least it could take them a long time to figure out what it is that they actually got their hands on. Although this predates GDPR, in opinion 03/2014 the Article 29 Working Party stated that breach affecting only encrypted data may also mean that the source of the breach isn't subject to typical breach notification procedures: Just something to consider. I'm personally still not convinced that storing emails encrypted makes a whole lot of sense on a typical website, but I'm also not a lawyer, or a specialist in data privacy for that matter. Still, if my business relied largely on storing personal data, I would probably consider taking every precaution in order to avoid a full-blown disaster
  6. Just a quick note on this one: to my best understanding GDPR doesn't explicitly require encryption. Encryption is mentioned as a suitable option for data processors and controllers in order to secure user data, but it isn't strictly speaking enforced – and thus not encrypting data (such as email addresses) wouldn't automatically mean that the product can't be GDPR compliant.
  7. Cross-linking this post from Diogo here
  8. Moderator note: the Modules/Plugins area of the forum is intended for module-specific support threads only. I'm moving this thread to the General Support area. Please post general support requests or questions to that forum area instead.
  9. This is less of a bug and more of a.. well, issue: the line length in the forum is kind of crazy. I'm getting 220-240 characters on a single line, while 100-120 would be good for readability. Would be great to get this fixed as well. I'm thinking that there probably should be a max width for the content area – or perhaps the font size should be double what it is now? The font is also really tiny and way too light (at least in some places, such as the breadcrumbs and other "less important" texts), neither of which really helps with the readability issue. Anyway, great job getting the update rolled out, and the forum looking more like the main site! Edit: I'm officially getting old. Setting browser zoom level to 125% or 150% makes things way more comfortable
  10. Don't shoot the messenger – I know this is from WordCamp, not ProcessCamp, but there's plenty of quality material there not strictly tied to WordPress https://wpwoofi.com/wordcamp-nordic-paneelit-2019/ Sadly the recording misses the beginning of the UX for everyone talk by Piccia Neri. This was my absolute favourite in the whole event, there were so many good points there. She has the ability to explain scary-sounding concepts and processes in a way that makes them really easy to grasp, and actually makes them seem attainable even in relatively low-budget projects "Lessons from WordPress core on how to (not) write code" has some good pointers for anyone designing dev tools, "Cache is keeping you from reaching your full potential as a developer" contains valid arguments, and although "Continuous integration and deployment with WordPress" is definitely WP-specific, the basic principles can be easily applied to other platforms as well. Just to mention a few. Anyhow, I hope someone finds these interesting
  11. No worries – no hard feelings here either! It's just that folks sometimes miss the point that having a module that does x for ProcessWire doesn't mean that ProcessWire itself, as in the core package, needs to do that. In this thread alone we've had some posts where this point has been lost. What third parties (such as me) build on top of ProcessWire does not have a direct impact on the core. I get that this is a topic that can bring some emotions to the surface, so trust me: I for one would not like to see ProcessWire go the "page builder route". At the same time I see a lot of value in having a block editor style Fieldtype – or something similar – as a module that one can plug in if and when that sort of feature makes sense
  12. This. Please read this before you post. Not a single person here has, to my best understanding, suggested that there should be a page builder in the core. This very topic is in the Modules/Plugins development area of the forum. This topic is not about the ProcessWire core. Thank you
  13. Thanks! Didn't know of GrapesJS, looks interesting That being said, my first impressions are somewhat mixed: the default theme is pretty bad in terms of accessibility, UI felt kind of confusing (possibly because there are a million options there), and overall it could use a major facelift. On the other hand it seems fast, apparently there are quite a few features available as plugins, and it does seem to be actively maintained as well. Overall I'm getting a strong "for power users" vibe from GrapesJS, and so far it doesn't seem like something that I'd be happy to introduce to non-technical clients who "just want to add some blocks". In other words: in my (possibly subjective) opinion Gutenberg still seems more viable than GrapesJS.
  14. Hey @pout, Just wanted to mention that the Modules/Plugins forum area is intended for module-specific support threads only. So unless you're releasing a new module, you should not post a new thread here. For general support requests I'd recommend the General Support area instead. Thanks! (I'm moving this thread to General Support.)
  15. Without going into too much detail regarding the previous discussion here, I've just heard of https://gutenbergcloud.org/ for the first time, and I've got to say that it seems promising. The basic idea is to provide a common service for installing all sorts of blocks – and only the blocks you actually need. (Currently the situation is roughly that some blocks are shipped as one-block plugins, while others ship as massive collections of blocks, neither of which are really optimal.) Also took a quick dive into Gutenberg for Drupal (which Gutenberg Cloud promotes), and they've done a smashing job there I'm definitely interested in looking into setting up a Gutenberg Fieldtype, or perhaps a Process module – or something similar. Though once again my desk is kind of full, so who knows. -- Although I did say that I wouldn't go into the earlier discussion, just a quick comment on that: As a tool Gutenberg has it's flaws, and it's definitely not a tool that would/could/should somehow replace what ProcessWire does. I don't think that anyone has been suggesting that here either. Gutenberg is a block builder, and admittedly one still in a relatively early state – but even at this stage it looks promising. There really aren't any serious contenders, particularly fully free and open source. Right now there's also a lot of momentum behind the project – not to mention financial backing from Automattic – which means that as a tool it will undoubtedly improve over time, and current issues will eventually get ironed out. Whether going with Gutenberg is a good thing for WordPress or not is a debate I don't want to get into. Personally I don't know anyone seriously developing sites with WordPress and not using either one of the existing block / page builder solutions, or some sort of ACF based approach. WordPress alone is not the point – the plugins are. Since block editors are probably the most popular way of building WordPress sites, in my opinion having one built into the core is a logical next step. But that's just my opinion. And again, it has little to do with ProcessWire
  16. Cross-linking this here, ping @ryan:
  17. Please note that the Modules/Plugins area of the forum is intended for module-specific support threads only. General questions and module requests should go to other areas instead. I'm moving this thread to the "Getting Started" area.
  18. teppo

    Error

    That error is a generic PHP error message, so making sense of it requires some basic PHP debugging skills. There's no manual here – just read the message, see what it is related to, and try to figure it out from there. Google is your best friend when debugging PHP code The message here is rather clear: In other words you're trying to call function and() on a null value in your _main.php file, line 49. The exact reason is impossible to say without seeing the code, but my guess so far would be that you're grabbing a page or something like that, and not actually checking that it has a valid value before trying to use it as an object.
  19. Your hook method isn't doing any caching, so every time it's executed, it makes a request to the API. In your head.inc file above you're checking if shopifyShopCurrency is already stored in session – but if it isn't, you're making two separate requests to the API: if ($page->ipapiGetUserLocation()['currency']['code'] && $page->ipapiGetUserLocation()['currency']['code'] !== 'GBP') { So, it seems to me that simply by grabbing $page->ipapiGetUserLocation() to a variable and using that for those checks you could probably cut your requests for new users to half. } elseif (!$session->get("shopifyShopCurrency")) { // Set it as the Shopify store default Just for the record, this row is kind of odd, since there's no chance that $session->get("shopifyShopCurrency") would be set by now. Although it should work, it's unnecessarily verbose and does kind of a pointless request to $session – a simple "} else {" would've been enough. It's probably unrelated, but it's also a bit strange that you're querying the currency code based on user location, but you're never actually using it. I'm assuming that this is by design, but it's still kind of curious
  20. Apparently "instanceof" doesn't allow constants, strings, or expressions, while is_a() happily accepts all of those. This is news to me, and I'm not entirely sure of the behind the scenes logic, but it probably has something to do with instanceof being a language construct (those sometimes behave a little bit unexpectedly) – or it might simply be a performance optimization. After all instanceof is much better in terms of performance than is_a(). Use variables or literal class names instead – or if you really have to, use the workaround provided by @tpr above, i.e. store the constant value to a variable before use
  21. Probably worth pointing out that currently the "safe thing to do" is going with 7.1 or 7.2: 7.0 is no longer officially supported, so it's no longer receiving security updates, and even 7.1 will stop receiving (security) updates near the end of this year. 7.3 is currently the "cutting edge" version, so you might want to wait a while before going there. In terms of security there are exceptions, such as Ubuntu, where distro maintainers have been backporting security-related fixes from new versions to old ones – but if you're already on 7.0, I would assume that it's not the one that you got with your operating system, and as such is likely that you're already using a (potentially) insecure version.
  22. I'm biased, and probably not the biggest user of Tracy either, but in my opinion support for PHP < 7.1 should be safe to drop by now. For the folks stuck with those versions, current Tracy version still works – right? That's what I've been doing with my modules and code recently: splitting a separate "legacy" branch for those who need it, but only focusing new development for current PHP versions. And by "current" I mean the officially supported ones.
  23. teppo

    Database focus values

    Actually I would recommend posting this as a GitHub issue. It's not really a "problem" per se, but I also don't see any point in storing all those decimals, so they're just unnecessary clutter. Hard to say if Ryan will consider it worth acting on though
  24. Well, it might be technically possible, but there's no core support for it, and I wouldn't recommend it In this case you would probably have to modify index.php, .htaccess, and at least some other core files: wire/core/ProcessWire.php, wire/modules/Process/ProcessLogin/ProcessLogin.module, and wire/modules/Process/ProcessPageView.module. Modifying core files is never a good idea, as it makes updating ProcessWire difficult (usually you can just replace certain core files and that's it), and there's also no guarantee that some third party module etc. isn't expecting the core to remain as-is. So, long story short: if you really have to, you can of course modify it, but there's no guarantee that things will work as expected afterwards. If possible, I'd recommend developing the ProcessWire site elsewhere (subdirectory, or another domain, or locally) and then replacing the old site in one go.
  25. Hey @adrian. Just wondering if this thread might've served it's purpose already, or do we still want to keep it pinned to the Modules/Plugins area? I'd say that it's been long enough, but it's your call
×
×
  • Create New...