-
Posts
10,882 -
Joined
-
Last visited
-
Days Won
348
adrian last won the day on June 25
adrian had the most liked content!
Profile Information
-
Gender
Not Telling
-
Location
Canada
adrian's Achievements
-
Hi @nurkka - thanks for narrowing it down. The current version uses: $config->urls->root which in most cases should return "/" but it was changed from "./" to fix this: https://github.com/adrianbj/TracyDebugger/issues/96. I am curious what crazy redirect stuff you have in ready.php that works with "./" but not "/" though. Can you figure out something I can change it to to work with the redirects you have?
-
Interesting - does the console panel work when you using it from the PW admin, rather than the frontend of the site? If you can't figure out the issue, perhaps a trial and error approach of going through the Tracy versions to see where the issue starts occurring might be the quickest in the end. Choose a version in the middle between the current, ie 4.26.34 and if that works, split the difference between it and .42 but if it doesn't, go for .30 - you get the idea and hopefully it won't take long to figure out which one breaks things.
-
Strange "Error: TracyLogsPanel" in one project
adrian replied to Stefanowitsch's topic in Tracy Debugger
The issue would have been that empty line - the blank string in the dump in your screenshot. Not sure why that would have happened - if you see it happen again, let me know and I'll adjust the logic to handle it, but it seems like a weird anomaly rather than something that happens normally. -
Strange "Error: TracyLogsPanel" in one project
adrian replied to Stefanowitsch's topic in Tracy Debugger
Hi @Stefanowitsch - can you take a look at the *.log files in site/assets/logs/tracy - each line in the files should start with something like this: [2023-07-18 07-59-40] Do any of the files have lines that don't have this? You could also add: bd($entry); after line line 67 in that TracyLogsPanel.php file and review the entries that are dumped to see which one doesn't have the date in that format so we can attempt to figure out how that might have happened. -
@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
-
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?
-
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.
-
User Activity module AJAX forbidden due to updated apache
adrian replied to adrian's topic in General Support
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. -
User Activity module AJAX forbidden due to updated apache
adrian replied to adrian's topic in General Support
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. -
User Activity module AJAX forbidden due to updated apache
adrian replied to adrian's topic in General Support
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. -
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.
-
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.
-
@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?