-
Posts
2,028 -
Joined
-
Last visited
-
Days Won
42
Everything posted by netcarver
-
☁️ Duplicator: Backup and move sites
netcarver replied to flydev's topic in Module/Plugin Development
Nice :) -
@wbmnfktr Have you given Jeffrey Star's 7g firewall a try? Very simple install straight into your .htaccess file.
-
@ryan Are you using this in your tool chain? If so, could you update the repo with any additional tests you've added, like the subfield test you mentioned above? Thanks.
-
Released: Street Address Fieldtype + Inputfield
netcarver replied to netcarver's topic in Modules/Plugins
Looks like the default country ISO was not being used when the country inputfield only had a single option. I've pushed version 1.1.3 with a workaround in the output that should allow you to remove your changes. -
@Ralf Please would you try out the new, ng branch, and let me know how it goes. The ng branch on github. Direct download link for the ng branch zip. Not for production sites at the moment. Thank you.
-
That was only meant as an idea for tracking down what might be at fault - obviously revert if this site is live, my apologies, I thought it was a staging server we were talking about.
-
I suppose the next thing I would try is editing the last part of the session::___redirect() function so it uses PHP to send the needed headers, taking WireHttp() out of the equation. Something like... header("Location: $url"); exit(0);
-
How about modules that might be hooking into Session methods?
-
Hi @psy Have you got anything on the site that hooks into session methods? Have you had a search for any similar open or closed issues on the processwire-issues repo? There might be something there that could help. You could try turning off unknown message method exceptions via the little-known "disableUnknownMethodException" config variable - this might get you through the line doing the redirect, but it will totally obscure the real issue here. Hopefully others might have better suggestions, or @ryan might take a look.
-
[solved] WireHTTP POST sending application/json data problem
netcarver replied to psy's topic in General Support
Hmm, in that case I'd resort to comparing the postman request with the wireHttp request. Other than that, I'm out of ideas for this one at the moment. -
[solved] WireHTTP POST sending application/json data problem
netcarver replied to psy's topic in General Support
Hi @psy are you able to compare all the headers being sent by postman with all the headers you are going over from WireHTTP()? Perhaps something that's needed is missing. Also, did you try changing "content-type" -> "Content-Type" ? Might be that the endpoint is being picky about case-sensitivity. Also, do you need to specify the character encoding? Something like "Content-Type" => "application/json; charset=utf-8"? Another thing to look at is the encoding flags for the json data. Might be that the way postman is encoding the payload is slightly different to the way PHP is encoding it. I'd dump the output of the json_encode() and carefully compare it to the format being sent from Postman (if it's possible to see it.) -
Released: Street Address Fieldtype + Inputfield
netcarver replied to netcarver's topic in Modules/Plugins
If you put this in your template file, just before you try outputting the address, what do you get? (Remove the PHP tags if you need to, and/or add nl2br() around the output to make it prettier)... <?php $country = 'DE'; $format = var_export(StreetAddress::getFormat($country), true); echo "Format for $country is [$format]"; ?> Here's what I get locally (run from the command line though) The other thing to check is that the address you are formatting is actually tagged up with Germany as the destination country? -
Released: Street Address Fieldtype + Inputfield
netcarver replied to netcarver's topic in Modules/Plugins
@clemens Thank you for the +ve feedback. I'm not sure I understand the issue you are having based on your description, but you can easily override the output formats, which are pulled from Google's LibAddressInput project, by simply editing the example.formats_overrides.php file in the FieldtypeStreetAddress/ directory. You'll need to look at the "Reading the JSON" section of the LibAddressInput project documentation to see what each of the fields is. In case it's not obvious, "%n" is a newline. This might allow you to do what you are after but, if not, please post again. Here's what one of my local DE-based addresses looks like - with no changes to the defaults from Google. This seems to have things in ZIP CITY order... -
I was going to suggest looking at the blackhole module by @flydev as well - but I think Teppo's update to page-render-up-restriction might be a better fit to your issue, @eydun.
-
Hello, Is anyone using static analysis tools like Psalm/PHPStan and/or Semgrep on PW here? If so, could you share a little wisdom with tricks/config that can help get started with them on a PW project? I've got a few semgrep rules worked out, and they seem to work well, but I'm struggling with the huge number of detections when using Psalm vs a PW project. I guess I could just baseline the current state of play and take things from there, but wonder if there is anything else I should be doing to make Psalm more aware of PW itself. Thanks for reading.
-
I've just tried ModSecurity 2.9.3-1 running the Owasp core ruleset 3.3.0 on an Ubuntu 20.04 LTS server and my select option fields seem to be working well. Perhaps ModSecurity and the core ruleset are more mature now.
-
No problem, thanks for looking!
-
Hi @snobjorn did you ever get this sorted out and get ModSecurity turned back on?
-
@eydun Can you edit that file, line 628, and make it read as follows... $f->description = $this->_("Choose which types of tracking you'd like.");
-
@eydun Can you try the new version of the module, here. You can just replace the entirity of the file called WireMailPostmark.module.php with the linked code.
-
@eydun Thank you for the post - doesn't look like this is PHP 8.1 related - will take a look and get back to you. Updated to add: Postmark have changed their Status API - something this module uses - and that is causing the breakage you are seeing above.
-
PW 3.0.172 – Find faster and more efficiently
netcarver replied to ryan's topic in News & Announcements
Looks like there's something wrong to me. The documentation says findJoin() returns a PageArray - but you are getting a string (with embedded null bytes too). -
Not sure how rockshell works, but I find SSH's config file very helpful. Perhaps something like this in ~/.ssh/config this could help here (if not already in use)? Host * IdentitiesOnly=yes Host staging IdentityFile ~/.ssh/<YOUR STAGING KEY FILE> #User bernhard ## Uncomment and change if server account doesn't match your local name #Port 22 ## Uncomment and change if server not listening on port 22 Any time an ssh connection is attempted to staging, it should use the correct identity file (or files if you add more IdentityFile lines,) rather than have SSH try all your keyfiles until the server complains.
-
I might be misunderstanding, but couldn't you do this in the base template...? <?php if ($page->id == 1044 || $page->parent->id == 1044): ?>