Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Kholja

  1. Just to be sure - maybe it's not a PW Issue. Did you check the E-Mail Headers?
  2. In case anyone stumbles upon this JavaScript error when clicking the Link-Button: ProcessWire.config.InputfieldCKEditor is undefined Workaround is to provide another field which uses the CKEditor (i.e. body field) in your template.
  3. This notice can happen if you use a page reference field in your template which has a wrong defined (i.e. deleted) parent page dependency. In my case I had a blog-post template which contained a page reference field to category pages. Additionally I had a parent page defined containing the categories. The error occured when I deleted this parent page.
  4. If you (or somenone) needs a more "secure" method maybe an easy review process could be realised like this: 1. Create two templates with similar fields (ie. article and article-draft). 2. article-draft is only visible to specific usergroup (ie editors) 3. after reviewing the editor could change the template from article-draft to article which is viewable by guests. This way you could also create a page showing a list of all article-draft pages, so the editor has an easy way to find all non-approved articles.
  5. If you just want to store some general configuration values without the need of a seperate admin page you simply could provide some configuration fields which you can access via module settings. It's a fast and easy way and it's covered in this post by Ryan: https://processwire.com/blog/posts/new-module-configuration-options/
  6. Snippet variation to achieve a optical better result. A little snippet addition to this older but maybe still useful post. If you use the orientation of an image to decide on your resize method you will often get an optical uneven impression, especially if aspect ratios of the images are very different (i.e. a row of logos). In this case it could be better to define a maximum width and a maximum height value which both should not exceed. Here's the variaton of @Soma's snippet to achieve that. $mW = 180; // max width $mH = 80; // max height $thumbUrl = ($mH / $image->height) > ($mW / $image->width) ? $image->size($mW,0)->url : $image->size(0,$mH)->url;
  7. I exported the site with ryans ProcessExportProfile Module and did a fresh install. This solved the problem. But would be nice to know what caused the issue. Thanks Adrian for your quick response and your support. Your posts were often helpful und a good resource for learning 🙂
  8. It's affecting all templates. I created a test template with only a few fields. It has the same bad performance.
  9. Definitely it affects the Frontend. I think a difference by factor about 20 (300ms -> 6s server response time) is probably not caused by the core. In terms of the backend I'm not sure if I'm starting to see ghosts... the impact there is not that big. Anyway - thanks for your precious input adrian. If i find out more I will post it here.
  10. Another interessting thing is that the frontend seems to slow down only when logged in as superuser. For guests the Site seems to work normal.
  11. "force su into dev mode" is not checked and there are no errors or warnings I didn't checked all panels, but It's enough to add one of them: ProcessWire Info or Request Info or Console or Panel Selector. It's not speeding up with i.e. Tracy Logs or ProcessWire Logs Backend works normal exept the pagetree. pagetree takes longer than usual.
  12. I tested both: Off can be "Enable Tracy Debugger" unchecked or uninstalling Tracy. Both leads to bad performance. If Tracy is enabled "Output Mode" can be "Production" or "Development". Both cases leads to normal operation. So maybe the question is what does Tracy change in the rendering process, when it is active.
  13. I know this sounds crazy at first. I have a site which shows a very strange behaviour on the live server. The Site behaves normal as long as Tracy Debugger is ON. Response time is round about 200-300ms. As soon as I disable Tracy the response time grows to several seconds (6-7s !). Once the server answers, the rest of the assets deliver fast. Ideas where to begin a research welcome 🙂
  14. Kholja

    Hanna Code

    Thanks mr-fan and Adrian. In case it's useful for someone, here is how I solved the problem. In fact I did not use Hanna Code in the end but some regex stuff, together with Adrians AdminActions Module (great work btw). I think this way you can convert any type of wordpress shortcuts to cleaner Hanna Code, get rid of not needed attributes or convert shortcuts to HTML. Example: I wanted to convert this: [av_image src='https://www.domain.de/link/to/image.jpg' attachment_size='large' align='center' lot_more='attributes'][/av_image] to a regular img tag. So I used a regular expression like this one: /\[av_image.*src='([^']*)([^\]]*)\]\[/av_image\]/ to match my shortcodes via the search and replace Action in AdminActions Module and replaced it with something like that: <img src="$1"> Which leads to an ordinary image Tag. $1 stands for the first group which is the src attribute. With variations of this you can convert nearly everything. But if you're not familiar with regex (like me) it can be very tricky. Database restore feature of AdminActions Module saved me some times 😉 For testing and learning I used this tool which helped me a lot in creating the regex Expressions: https://www.phpliveregex.com/
  15. Kholja

    Hanna Code

    Thanks for the reply Adrian. I'm understanding your example. This is how I do it usually myself. In my case the original markup comes from the wordpress import (and the original Wordpress shortcuts). So I wanted to deal with what I got. If Hanna Code doesn't support closing tags I eventually have to find another way to convert the imported posts to fit Hanna Code.
  16. Kholja

    Hanna Code

    I agree totally with you Adrian 😉This is just an example what came out of the old WP Site. In this case the final result will just be surrounding div with a class. But The point is - how to catch the Text BETWEEN the tags and get rid of the end tag via Hanna Code. To make it more clear: [[av_textblock someAttributes]] Some Text [[/av_textblock]] should go into something like this: <div class="textblock"> Some Text </div>
  17. Kholja

    Hanna Code

    Convert Wordpress shortcodes with "end tags" to Hanna Code I imported posts from a Wordpress site via WordpressMigrate Module. I used the Convert Shortcodes to Hanna Code Option. The Plan was to write some Hanna snippets to replace the former shortcode functionality. In most cases this works like a charm. But sometimes the codes uses kind of a Start - End Tag Syntax like this: [[av_textblock size='' font_color='' color='']] Some Text [[/av_textblock]] Anyone got an idea how to get a grip on this ? Is it possible with Hanna Code ?
  18. Hello Community, just used AIOM for the first time and ran in some of the issues mentioned above. Got it to work with the help of this thread. Thank you guys. Just in case someone finds it useful I add additionally some steps to update the CssMin Library quickly, until we get the next AIOM Update: Create Folder site/modules/AllInOneMinify/lib/CssMin Get the four files from: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/tree/master/src (Colors.php, Command.php, Minifier.php, Utils.php) and put them in the folder above. Remove namespacing after php tag in these files (i.e. delete namespace tubalmartin\CssMin;) Change code in site/modules/AllInOneMinify/AllInOneMinify.module: Z.541 replace the require_once statement where it includes the CssMin Class File with: // require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'cssmin.php'); require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Minifier.php'); require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Colors.php'); require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Command.php'); require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Utils.php'); Z.620 replace the following line // $cssMin = new CSSmin(); $cssMin = new Minifier(); That did the job for me.
  • Create New...