Jump to content

elabx

Members
  • Posts

    1,239
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by elabx

  1. Are you triple sure sectionfield_fa_membership doesn't have any typo? (Doesn't look like it!) Are you accessing $page in the right context? Seems you want to do this in a regular template file? You might be within a field rendered through wireRenderFile?
  2. Hi! I've made an experiment to support nested repeaters updating a little bit the previous update. Not sure how common this is, but I have a lot of scenarios where I have at least one extra level of repeaters, and I'd benefit from this dependency update to change the fields of nested repeaters. https://github.com/elabx/processwire/pull/1/commits/bdf7e4fc21961712abf7ee3e1e6910de32683725 Not sure if you are in the possibility of testing this @adrian? Thanks!
  3. Hi everyone! I built this module trying to solve the following issue. Most of the time I use Repeater Matrix types with a few fields wrapped in a fieldset that are for configuring the behaviour/rendering of a specific repeater type, and are not really content related so I had always wanted to have them kind of hidden, but with a small preview of that the options are set (which I've yet to do). https://github.com/elabx/FieldtypeFieldsetPanel
  4. I think you might have it backwards? The "new image fields" actually use the filedata column to save the individual fields value, the older modules used to alter the schema of the image field. Someone correct me if I'm wrong πŸ€”
  5. Sorry for the offtopic, but will second vote for this πŸ˜„ Do you happen to use docker in production?
  6. Rather this looks a lot like Migrations module! Take a look you might be interested! Which btw I've been using for quite a few years along RockMigrations even if it shows it's deprecated, works just fine at least on PHP 7.4 which is where I'm stuck.
  7. Maybe somewhere you have a <?= $something = "whatever" ?> that might be returning a value as bool, hence showing 1. At least this has happened to me when random number 1 appears haha
  8. I use OrbStack but unfortunately it's the only thing I've ever used as a Docker provider so I can't draw a comparison with regular Docker lol. All I can say it's been fast and hassle free.
  9. I think this is what you are looking for: https://github.com/somatonic/Multisite/ But as you can see, it's not a very maintained module. I'd suggest you take a look at the forum thread of this module, it seems people are using this fork of the project.
  10. I would try InputfieldWrapper::render since the repeater items are wrappers themselves πŸ€” but not sure super.
  11. They way I've sort of done this is with New Relic, you install agents for php/apache/mysql in the server and does it's magic to monitor the relevant processes. And I say "sort of done this" is because I didn't really plan for anything, just wanted to test it out and got easily overwhelmed by all the features it has and concepts I don't really understand. I did manage to get alerts on spikes in memory and load, but that's about it and I'd say thats like 0.01% of what newrelic does, but kinda solved what I needed at that moment.
  12. Hi @Focksbot! It would depend on how your site is rendering it's frontend output. Check output strategies. From most common to less common is: Direct output Delayed output Markup regions So first I'd check if there exists a home.php file in /site/templates and start from there to see if direct output is implemented. Also if you read the docs above its a good place to start too. If you still feel lost, maybe a screenshot of how your filesystem looks would help too, to see the organization of the template files. But almost 100% sure that what you're looking for is in /site/templates This is sort of ProcessWire's blessing and curse (for people unfamiliar with ProcessWire) as it doesn't have an output strategy tightly coupled with a specific set of data such as posts/pages like in Wordpress, in ProcessWire those would have to be built with templates/fields and eventually Page(s), the main building blocks of data in ProcessWire.
  13. It's not exactly the same technique, but I have just got into this rabbit hole and after a bit of blood sweat and tears and help from a pal, this is working for me while using ProCache and using the nonce attribute on scripts. This configuration assumes you have mod_substitute and mod_cspnonce installed. <If "%{THE_REQUEST} !~ m# /processwire/?#"> Options +Includes AddOutputFilterByType SUBSTITUTE;INCLUDES text/html Substitute "s|--CSP-NONCE--|<!--#echo var=\"CSP_NONCE\" -->|i" # Customize to your needs Header add Content-Security-Policy "default-src 'self' 'nonce-%{CSP_NONCE}e'; </If> Place this at the end of the ProcessWire htaccess directives. This should swap on the fly the Apache response and replace any --CSP-NONCE-- script. Then on Apache you can also set the nonce headers like this: I do not use this because my server setup uses nginx as reverse proxy. For example: <script nonce="--CSP-NONCE--" src="https://totally-safe-website.com"></script> Will end up as: <!-- nonce swapped on every request! --> <script nonce="0O4I3O5nNFG/MVpqormzyIuH" src="https://totally-safe-website.com"></script> @ryan fyi In theory, this would be A LOT simpler in Apache 2.5, since you could put an expression within the Substitute directive instead of the server side includes to substitute the "--CSP-NONCE--" script, but right now I'm limited to Apache 2.4 in the setup where I need this since I don't have control of the stack versions. So this should work in Apache 2.4+
  14. Try pushing the max_input_vars value in the server.
  15. That json parse error should have the info we need to know, it's probably appendind/prepending an error message and that's why the JSON.parse on the response. If you can get to the plain text response, let me know what it's got.
  16. Hi @virtualgadjo! Is there any info on your logs? Are the ajax requests involving file upload returning anything at all or what status code?
  17. It seems this got updated in the last few versions: Check this thread: https://github.com/processwire/processwire-issues/issues/1791 And also this commit which has new $config options: https://github.com/processwire/processwire/commit/013231acdabd7b42640c1a9975c9e54ecf366b45
  18. @ryan Out of curiosity, and of it's possible to share publicly, were you working in something in particular in the PW admin where you needed to add custom attributes?
  19. Hi @ryangorley! Not sure if you've taken at this old but still very relevant post: I'd say the best way is the one that fits your use case and in that sense ProcessWire has no rules about categorization. The tags can exist under their own parent separate from the "News > Blog Item 1" tree branch: /tags/tag-1 And be linked through the tags inputfield, it's pretty much the same case for categories. To my own personal taste I always tend to go with an structure like this: - πŸ“‘ News -- πŸ“‹ Tags ---- πŸ“— Tag 1 ---- πŸ“— Tag 2 -- πŸ“‹ Categories ---- πŸ“— Category 1 ---- πŸ“— Category 2 -- πŸ“˜ News Item 1 -- πŸ“˜ News Item 2 I like this because it keeps everything in the context of the "News" for the editors, and also the following URL structures which makes sense to me (not so sure about SEO but have had no complaints lol): /news/tags/tag-1 /news/categories/category-1 /news/news-item-1 The only part I'm not a huge fan of is that it requires a bit of code using hooks to keep the right sort underneath the "News" page, since the actual news items share a parent with the tag/categories parent, sorting the News children by published reversed, will (most likely) send the Tags and Categories to the bottom. But it ain't that big of a deal and if the problem arises to you I'll gladly share my solution. Also, to my own taste, I use a custom field for publish date, this lets me have more control over it and handle the visibility of the actual post with the hidden/unpublished status depending on what I want to achieve. Now for archive pages i'd suggest you take a look at what @ryan did in this old but also still relevant blog profile: https://github.com/ryancramerdesign/BlogProfile/blob/master/site-blog/templates/archives.php In all fairness this is not the clearest example and it's one of those part you'd expect to be built by default in a CMS, but I always think these details are worth the effort as a sacrifice for the flexibility PW gives you in terms of data structure/relation.
  20. Maybe this part should be: $form = $forms->render('kontakt', [ 'form_page' => $page->parent->title . " " . $page->title , 'page_with_contact_email' => $page->parent("contact_email!="); ]); So this part: $page->parent("contact_email!="); Should traverse upwards from the page where the form is rendering until it finds a page with the contact_email fileld.
  21. Do you have the regions configuration set to true?? In site/config.php $config->useMarkupRegions = true;
  22. I'd need to do a dig in my repositories but I remember doing something like this hooking into InputfieldPage::processInput and updating the parent_id property of the InputfieldPage object before processing the page to be saved, so that it would make it valid.
  23. Aha! gotcha! Do you mean the Stripe webhooks part or how FormBuilder handles the process?
  24. Could you debug if the webhooks are correctly setup and working?? It's the first thing I'd think of, if i remember correctly, the entries will only show on successful payment.
  25. About URL hooks Not sure it has change but once happened to me that I couldn't do optional segments, example: /get-images/{page}/{field}/ Request wouldn't reach if I tried to get to: /get-images/{page}/ Then I think the concept of middleware is not present? So say you want to block unauthenticated calls, check CSRF, etc, you'd have to make that check on every route hook. Probably AppApi is still the way to go, feature wise? Project seems very alive! Edit: Just reading AppApi actually uses path hooks to bootstrap its endpoints.
Γ—
Γ—
  • Create New...