-
Posts
11,241 -
Joined
-
Last visited
-
Days Won
374
Everything posted by adrian
-
@mel47 - please test the attached version. There is a new option (on the Input tab of the field) for "Allow formatting characters in Input, eg. - ( ." Note that unlike the "Letters" option, the formatting characters will be stripped before saving to the DB. FieldtypePhone.zip
-
Hi @MarkE - thanks for your hard work on this. It looks like a great start but in my initial testing I am unfortunately seeing some issues. I'd love to see this working reliably and I think #1, #2, and #3 are manageable, but not sure about #4. 1. I think page names need to be page paths because currently children and grandchildren are stored just by name and during an import these could match multiple pages (same name but different branch). 2. If a module stores JSON as one of its config settings, the quote escaping backslashes prevent your regex from matching. An example is my CustomUploadNames module: "ruleData":"[{\"tempDisabled\":0,\"enabledFields\":[\"102\"],\"enabledTemplates\":[\"29\",\"1\"] 3. Single value fields don't seem to work. For example a config settings field like this still returns: "specifiedTemplate":"29" 4. I fear that if you try to support that then you'll also need to be careful about numbers that could be valid template or field IDs. If these are stored as an InputfieldInteger (like I do with Tracy's log line length settings where the default is 100) you'll be OK, but if the module uses an InputfieldText then the quotes will be added to the number and it will possibly match a field and then things will become a mess. Any thoughts?
-
@mel47 - Did you consider using the option to have separate area code and number fields which I think would avoid that confusion. If you don't want that option, I think I could pretty easily have any option to allow dashes and parentheses but automatically strip them when saving to the database. Would that work ok for you?
-
Hi @Laegnur - thanks for the report. I don't honestly know when this stopped working as expected, but I have added array('allowCustom' => true) to the "$pages->find" call that results from the selector you define and it works now in the latest version. Let me know if you have any continuing issues.
-
Hi @virtualgadjo - I see where you're coming from, but I am wondering whether this would be a system wide setting or if it would need to be a setting on each rule? I am tempted to think that your suggestion for hooking into customRenameUploads() might be the best option though, but if you feel like adding a setting for your needs, I'd be happy to accept a PR.
-
Works for me if it's inside a: $(document).ready(function() { On a somewhat related note, are you making sure to manually call: $this->wire('modules')->get('ProcessPageList'); I wasn't getting the page list to load without that. I assume you are because you're in a process module, but I wasn't getting it to work and came across this old thread: https://processwire.com/talk/topic/15938-typeerror-aprocesspagelist-is-not-a-function-in-admin/
-
If you were testing on the backend, I am struggling to figure out how a template could be involved. I don't even know how it would get the code the from the template. Can you please provide the relevant code from the template and the code you were running in the console that is causing this. Otherwise I really am just guessing :)
-
@MarcC - your response makes me think I didn't explain things properly because given the behavior you're seeing, I feel like you are probably already using that feature. If you're not using it, then there might be a bug causing the issue you are seeing so it would be great to know more about how you have things set up.
-
$role->branch_parent is what you're looking for rather than admin_restrict_branch. But otherwise your example code should work.
-
@biniyam if you configure this module to the restriction you need you should be fine if your form assigns the required role to the users. It sounds like the "Role Specified Branch Parent" might be the best option based on your description - shouldn't need a php script.
-
You're right, but how is it possible to move sideways (x-axis) without going slightly up or down (y-axis)? I don't really understand why y-axis movements should trigger any change at all.
-
MacOS Brave and Chrome both have the issue for me.
-
Am I the only one seeing major bugs with the new template width functionality? See how the percent is going down, but then jumps back up again as I continue to drag to the left?
-
User Activity module AJAX forbidden due to updated apache
adrian replied to adrian's topic in General Support
@Jonathan Lahijani - that's my plan for now. I don't know for certain that 2.4.63 will fix this issue, but from what I understand it sounds like it will. That said, it still hasn't even been released on their Github repo yet: https://github.com/apache/httpd/tags so not sure how long it will be before it makes its way to APT etc, especially for Debian if it's not considered a security update. -
@bernhard - the thing is that the loading of the Tracy bar is handled by the core Tracy package - I just call the PHP command to enable it: https://github.com/adrianbj/TracyDebugger/blob/63eae91b18b1881e0ac99f6c33930f93ba764956/TracyDebugger.module.php#L1508. If you view the page source, you'll notice that weirdly it is added after the closing </html> - maybe that is part of the problem? I have lots of sites with fixed footers and never seen the issue you are referring to and FOUCs are a pet peeve of mine :)
-
Nevermind, I think I just found it - an empty email address for one user :)
-
@nbcommunication or anyone else ever seen this error in the "wire-mailgun" log? 'recipient-variables' parameter is not a valid JSON $recipientsArr[$emailAddress] = [ 'id' => $recipient->id, 'email' => $emailAddress, 'first_name' => $recipient->first_name ]; $mailer->addRecipientVariables($recipientsArr); It happens during a loop of email sends - there are lots of different emails, each sent to one or a few people so the emails are sent in batch mode, but it seems like only one of the emails in the loop actually triggers this error. I feel like perhaps there is something weird with the first name for one of the recipients (maybe a strange character or something), but before I pull all my hair out, I was hoping to hear that someone else had already come across this and know what to look for :)
-
On a side note, I would really recommend you upgrade your PHP version - 7.x hasn't had security updates for quite some time now!
-
Hi @aComAdi - sorry for the issues you've been having, but thanks for narrowing things down. I think it's likely this commit: https://github.com/adrianbj/TracyDebugger/commit/4b35ecddfb184cd7a04c3614fb40ac72d0a62874 to fix this issue: https://github.com/adrianbj/TracyDebugger/issues/96 I have never set up a site in a subfolder in such a way that an AJAX call to "/" doesn't work as expected, so I can't really test this, but I think the latest version should fix things for you. @Jonathan Lahijani - can you please make sure this new version doesn't affect the issue you had with bootstrapped files?
-
User Activity module AJAX forbidden due to updated apache
adrian replied to adrian's topic in General Support
Just a follow up here for those who haven't found the Github issue: https://github.com/processwire/processwire-issues/issues/1952 It looks like the next version of Apache (2.4.63) will include a fix (https://github.com/apache/httpd/commit/a1a93beb58b81f1de2b713ae5f96c41ed5952a74) that should hopefully prevent this from being an issue for PW. -
It's not quite as simple as a user being unpublished - it could be changes to the account pages referencing them as well and it's multiple different templates. The other reason for this approach is that I want to continue to alert users with a wire()->warning which wouldn't persist if I hooked on unpublished or changes to those other pages. Same kinda goes for emails or other alerts - I feel like this one needs to be a constant reminder. Perhaps a better approach would be to prevent unpublishing any user tied to an account page and prevent saving an account page unless a valid published user is selected. So many options :)
-
Thanks @BitPoet - it probably is pretty similar in actuality, but it feels semantically correct in your case and just a bit off for my needs which aren't related to the theme's markup or menu etc. Thanks @ryan - I tried without a hook in templates/admin.php but the code was still called twice (again, the AJAX request for the page list), but as you suggest, I could definitely wrap it in a if($!$config->ajax) check. I think that probably makes the most sense. I initially thought things like Processwire::finished or Proccess::execute would only be called once but again that page list AJAX is the problem. And thanks for the session idea which sounds like a good option. Just an FYI - I have a check to make sure the integrity of some page reference fields (selected staff on client accounts) and I need to make sure if a staff member is unpublished that a warning is given. It's pretty efficient but I don't really want to run it on every admin page load, but ProcessLogin::loginSuccess isn't really enough either because our sessions don't often expire given how often we are in the admin.