Jump to content

adrian

PW-Moderators
  • Posts

    10,877
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. @JayGee - not currently. I wonder if the best option might be to make protectedCheck() hookable and then you could add an exception for the required page via a hook in ready.php
  2. That does all sound very weird, but I don't think it has anything to do with the point I made (that you quoted above) which is about editing things like the title, name, or status in the "Edit child pages" table - those are what would be overwritten if not saved before opening a child page for editing or viewing in the same tab - make sense? Do you have Ryan's User Activity module installed by any chance? I wonder if it's perhaps dynamically updating things? Otherwise I really don't know, but I also am not sure how it could be related to this module because we are of course just editing in a modal window which is an iframe of PW's page edit process. I don't think any sort of browser caching could impact this, could it? Unless changing this line: $this->editedPage = $this->wire('pages')->get($id); to $this->editedPage = $this->wire('pages')->getFresh($id); And maybe this one: $cp = $this->wire('pages')->get($id); to $cp = $this->wire('pages')->getFresh($id); fixes things?
  3. Understood, but I think the default should be modal to be in the spirit of editing child pages in the one place without opening a page in full. If you have edited the fields or statuses within the children's table and not saved, and you open a child to view you would lose those changes - hence the need for new tab or modal.
  4. That should be solved with the latest dev version of PW anyway. As for other issues, I am not sure if there are any core ones, but it's still very possible to trigger in your own application code.
  5. Just the last comment: https://stackoverflow.com/a/79072359/1524576 As for whether this affects you, it depends on the version of apache you're running. The current version (2.4.62) still has the issue, but Ryan implemented a fix for embedded links in RTE fields with ? in the URL. It still impacts the UserActivity module unless you hack it. When the fix makes it into Apache will depend a bit on your linux distro unless you compile and update yourself.
  6. Just a little more info - https://stackoverflow.com/questions/78729429/403-forbidden-when-url-contains-get-with-encoded-question-mark-unsafeallow3f The last (current) comment about Craft's rewrite rule shows that this bug is starting to affect a log of people.
  7. Hi @MarkE - this was all done a long time ago before the pw-modal class was available, but the key reason a modal makes sense for editing is that any changes you make while editing in the modal are applied immediately in the row of child page in the table of children once the modal is closed, so I don't think it makes any sense to have different window opening options for editing. But for viewing pages, I always thought that would be better in a new tab, but I suppose a modal or panel might be preferred sometimes, so what about this solution which matches the default behavior of PW's page list action buttons by allowing you to open in a modal with a long click, but still open in a new tab so you don't accidentally lose any changes to other pages in the child editing table? $cp->viewable() ? ' <a class="pw-modal pw-modal-large pw-modal-longclick" href="'.$cp->httpUrl.'" target="_blank"><i style="cursor:pointer" class="fa fa-eye"></i></a>' : '', Just playing around with this and for some reason the pw-panel class doesn't work, but pw-modal does. Maybe it's not being loaded for some reason in modules.
  8. Thanks @MarkE - 1, 2, & 3 all look to be working great now! As for 4 - sorry, I hadn't looked at your code well enough to see those restrictions on the key name - looks like a solution that should work often enough to be OK. Would you like to send me a PR? Thanks again for this - should be an awesome improvement.
  9. @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
  10. 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?
  11. @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?
  12. 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.
  13. 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.
  14. 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/
  15. 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 :)
  16. It will appear as a checkbox on the Console when used on the frontend. Compare: with: The code in home.php is: $page->title = 'Test modify'; which only takes effect if that "Template resources" option is checked.
  17. @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.
  18. Hi @MarcC - it should only work that way if you check the "Template resources" option in the Console. If it's happening for you without that checked can you please provide the exact code you have in your template that is resulting in this.
  19. $role->branch_parent is what you're looking for rather than admin_restrict_branch. But otherwise your example code should work.
  20. @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.
  21. 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.
  22. MacOS Brave and Chrome both have the issue for me.
  23. 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?
  24. @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.
×
×
  • Create New...