Jump to content

adrian

PW-Moderators
  • Posts

    11,022
  • Joined

  • Last visited

  • Days Won

    359

Everything posted by adrian

  1. Hey @bernhard - good catch. New version supports searching whatever is in the label.
  2. Hey @bernhard - I revised the last commit so now you can use tags. The default is now set to: {name} ({email}) Hope that helps you and others.
  3. Hey @bernhard - I didn't come to the forum to see your updated suggested about the email in brackets and already added the custom label field option, so hope that's ok.
  4. Yeah, might be worth a strikethru of the "logs" and add "info" so it isn't too confusing when reading through, but also points to the exact issue in the title.
  5. Thanks @iank - curious if you have Ghostscript installed - I do and don't have any issues, but some of the reading I am just done suggests it can contribute. The other thing that comes up is a missing or misconfigured font paths (e.g., /etc/fonts/fonts.conf) I did also read that IM6 is slower at this than IM7, but I am also running 6 without issues, so who knows :) Otherwise, I am really not sure at this point. I'd love to hear if anyone else has the same issue. It's possible to use an exec call to IM's convert but I didn't take that route because on some servers exec can be disabled. Maybe the best option for you is to just disable the Versions List unless we hear others having the same problems.
  6. Thanks @iank - could you let me know what version of PHP and imagemagick and imagick you are running? Could you also figure out if it's queryformats() or getVersion() that is the main culprit. Thanks.
  7. I don't actually cache anything for this panel - never seen any performance issues before, but perhaps PHP's OpCache is? Perhaps you would be willing to debug which component is the issue? These are the lines that populate the various versions. You could start by commenting out the MySQL ones, then the server settings, then apache modules, etc. https://github.com/adrianbj/TracyDebugger/blob/5e5d483a7f4d30c4e3f52c40921897a4603b6151/panels/ProcesswireInfoPanel.php#L205-L292
  8. @iank - just committed a new version with a revamped panel selector - now uses a table and fixes those wrapping / alignment issues. Hopefully this will prevent future confusion as to what panel is having issues.
  9. Thanks for figuring that out. At least the logs rabbit hole made me notice an issue with its caching which is great :) Now for the reason for the Info panel - can you please go through Tracy's settings for the panel and figure out which of its sections are causing the slowdown - I can only think it's the Versions List and something on the server taking a long time to return something within that. I can replicate the misalignment issue when the ms is really long like that, so I'll take a look at fixing that.
  10. Thanks for all those details - helps to narrow things down a bit - it's certainly not an issue with the size or number of log files. I still don't know why you're having the slow loading or why the ms/kb is showing when the panel isn't loaded - I'd be curious if there is a difference if the panel is disabled permamently from Tracy's settings. One thing I did just find and fix was the caching - it wasn't actually working as intended. I still don't think it will help with your slow loading, but worth checking to see if it also has any impact on the ms/kb populating when the panel is disabled - it shouldn't but who knows 😖
  11. Hi @iank - that first screenshot is confusing me because if the PW Logs panel is disabled, it shouldn't load at all and you shouldn't see any ms/kb values. I am not really sure what you mean by "only seems to work for a minute or so, and then the long loading time reappears" - if you're using the "sticky" option to disable it, then it should remain disabled until cookies are cleared, but even if that happens, the checkbox next to it would be checked. I can't see a way for the ms/km to be there with the checkbox unchecked (after sticky has been clicked). As for the actual slowdown - you mention that the log files on dev are the same - are they the same size as well? How large are the log files - can you check through and let me know the largest one. Are you loading just the default last 100 lines? It's also worth noting that Tracy caches the lines from the log files so it should only ever read them if their modified timestamp has changed since the last load. Let me know those things and we'll go from there.
  12. Just a note that I set Tracy to 100000 so you'll want to make sure your highest one is still lower than that if you want to be able to use Tracy within other modules.
  13. Having Tracy run on production servers in production mode can be a very useful tool - logging exceptions with Tracy's full stack trace saved and notification of errors via email and slack.
  14. Thanks @Tiberium I can reproduce if I try to load Tracy's settings page when it's not enabled and the logs file doesn't exist, but this is not something that will ever happen with a regular usage which I suppose is why no-one has ever reported it. Anyway, new version should sort things out for you.
  15. Hi @Tiberium - Tracy definitely tries to create the directory: https://github.com/adrianbj/TracyDebugger/blob/98d9d3b8c3eb141f25d75ec1a4ec62d12ad42527/TracyDebugger.module.php#L995 everytime it is loaded, so there must be some permission issue.
  16. Yeah, actually that is a better approach - I was actually just falling asleep and realized that there is the possibility of an RTE with something like empty <p> </p> tags so you definitely want to strip those before checking !$text
  17. Sorry, now I am seeing: Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated I guess it needs to be after: if(!$text) return;
  18. @Robin S - I just did a little bit of testing between various online Flesch Kincaid Reading Ease calculators and the same text resulted in very different "reading ease" scores. Your module - 52.5 https://serpninja.io/tools/flesch-kincaid-calculator/ - 37.85 https://hemingwayapp.com/articles/readability/flesch-kincaid-readability-test - 50 https://goodcalculators.com/flesch-kincaid-calculator/ - 46.8 https://charactercalculator.com/flesch-reading-ease/ - 43.16 https://codebeautify.org/flesch-kincaid-grade-level-calculator - 31.9 https://app.readable.com/text/?demo - 50.4 ChatGTP - 47.2 ChatGPT also tells me that the reason for the differences I am seeing is due to the counting of syllables and sentence boundaries, etc so I guess the key thing is getting used to what your module returns and compare relatively with other field content on the site. One thing I didn't understand though is why the readable.com demo wasn't returning the same score as your module given that https://github.com/DaveChild/Text-Statistics?tab=readme-ov-file#useful-links links directly to it as a demo of it in action. But looking into it, I realized that when I was pasting the text into these calculators, it was just text and not the HTML that is part of RTE field content. So, I added $text = strip_tags($text) and now I get the same 50.4 that the demo on readable.com does. Do you think it makes sense to add that?
  19. Thanks @Robin S - good point on the color coding. Thank you for the formatted content fix and a great implementation of the tooltip info. Much appreciated as always.
  20. And/or maybe a hover tooltip that shows some more info about each particular score, eg if the Automated Readability Score is 5, then the tooltip would display: Age: 1-18 Grade Level: 5th If you want some help setting this up, I'd be happy to create some JSON that contained all this info for all the scores that your module could parse. Actually, ChatPT to the rescue. This prompt "Automated Readability Index JSON of scores to ages and grades" returns: { "0": { "grade": "Kindergarten", "ages": "5-6" }, "1": { "grade": "1st Grade", "ages": "6-7" }, "2": { "grade": "2nd Grade", "ages": "7-8" }, "3": { "grade": "3rd Grade", "ages": "8-9" }, "4": { "grade": "4th Grade", "ages": "9-10" }, "5": { "grade": "5th Grade", "ages": "10-11" }, "6": { "grade": "6th Grade", "ages": "11-12" }, "7": { "grade": "7th Grade", "ages": "12-13" }, "8": { "grade": "8th Grade", "ages": "13-14" }, "9": { "grade": "9th Grade (Freshman)", "ages": "14-15" }, "10": { "grade": "10th Grade (Sophomore)", "ages": "15-16" }, "11": { "grade": "11th Grade (Junior)", "ages": "16-17" }, "12": { "grade": "12th Grade (Senior)", "ages": "17-18" }, "13": { "grade": "College Freshman", "ages": "18-19" }, "14": { "grade": "College Sophomore", "ages": "19-20" }, "15": { "grade": "College Junior", "ages": "20-21" }, "16": { "grade": "College Senior", "ages": "21-22" }, "17": { "grade": "Graduate Level", "ages": "22+" }, "18": { "grade": "Graduate Level", "ages": "22+" }, "19": { "grade": "Professional Level", "ages": "22+" }, "20": { "grade": "Professional Level", "ages": "22+" } } So it should be easy to do the same for all the other indices.
  21. Hey @Robin S - this is really useful, thank you as always. A couple of thoughts. Would you mind passing the text through Hanna first. I have a lot of tags in some content and readability is very poor unless I add this to your module. $hanna = $this->wire('modules')->get('TextFormatterHannaCode'); $text = $hanna->render($text); What do you think about adding some easy way to identify if each of the scores is good or not - at the moment you have to look up the docs, but perhaps color coding the values (red, orange, green) or some other way would help to alert us to issues. Thanks again!
  22. Actually, on this note, why do RM fields use buttons, but repeater fields don't?
  23. I've honestly never looked at that option - it seems like a lot of work though on a site with a lot of fields. As I mentioned in my post about this, I thought the "Input types that should be offset with additional top/bottom margin." via Modules > Core > AdminThemeUikit would be the place to set this, but it doesn't seem to do anything. Even if it did, it's still a decent amount of work to set all types. Can you confirm if that setting is also supposed to do the same thing and if so, can we have an option for all? Or maybe I should just use some CSS for this.
  24. @ryan - did you see my comments about top and bottom margins between fields when on PageEdit? Is that setting supposed to make it look like the ProcessModule interface?
  25. @ryan - what do you think about adding the scrollbar (like the menu dropdowns now have) to the Page List > Add New button - I have enough of these that they extend well beyond the viewport.
×
×
  • Create New...