Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

1,416 profile views

LAPS's Achievements

Sr. Member

Sr. Member (5/6)



  1. I confirm that the CKeditor image is the problem... with ProCache! I'm using ProCache and if I disable it, all works: the image is shown and I (the admin user) am not logget out. It also works if ProCache stays enabled and I set in ProCache > CDN > CDN status > "Enabled for guest visitors only". Maybe there is a bug somewhere. @ryan
  2. @adrian I'll test in the next few days (I hope)
  3. I upgraded to Tracy v4.21.33 and confirm the problem still occurs. I had to disable Tracy to solve it.
  4. v4.21.30 (as wrote in the linked post 😉 )
  5. Around line 333 I've the following code: // load Tracy files and our helper files $tracyVersion = version_compare(PHP_VERSION, '7.1.0', '>=') ? '2.7.x' : '2.5.x'; require_once __DIR__ . '/tracy-'.$tracyVersion.'/src/tracy.php'; require_once __DIR__ . '/includes/TD.php'; if($this->data['enableShortcutMethods']) { require_once __DIR__ . '/includes/ShortcutMethods.php'; } Probably I'm not using the latest Tracy core update.
  6. In Admin > Modules > Tracy Debugger, I checked "Enable Tracy Debugger". Then, in front-end, I clicked the button so to have this Tracy Debugger panel . When I click a link for downloading a file the error is still generated. How should I change the code line?
  7. @adrian I don't know if you've access to the linked topic in my previous post, but I'm not using any hook for RepeaterMatrix nor InputfieldRepeaterMatrix. The error with RepeaterMatrix occurs when Tracy Debugger is enabled and it doesn't occur when Tracy Debugger is disabled. Could be this a bug?
  8. When Tracy Debugger is enabled, I get ProcessWire\WireException: Method RepeaterMatrixPage::render is not hookable
  9. Yes Yes Waiting for the availability of the newest PrivacyWire version (0.4.4) to give it a try.
  10. The following procedure makes PrivacyWire to work in combination with ProCache, performing the minimum amount of HTTP requests. In PrivacyWire config option, check "Render Banner and Header Content Manually" and uncheck "Add basic CSS Styling". In directory /site/css/, create the file PrivacyWire.css which includes the PrivacyWire CSS statements. In source code, add: <head> ... <!-- CSS --> <link rel="stylesheet" type="text/css" href="<?= $procache->css([ ..., '../assets/css/PrivacyWire.css' ]); ?>"></script> <!-- JS --> <!-- Note: Here order is important. Render these two lines before adding PrivacyWireUnstyled.js --> <script>var PrivacyWireSettings=<?= $modules->get('PrivacyWire')->getInlineJs() ?></script> <?= $modules->get('PrivacyWire')->renderBodyContent(); ?> <script src="<?= $procache->js([ ..., '../modules/PrivacyWire/js/PrivacyWireUnstyled.js' ]); ?>"></script> </head> <body> ... </body> Not an elegant way to make things but it works. Any improvement is welcome.
  11. I think the PrivacyWire.js/PrivacyWireUnstyled.js file is requested by the PrivacyWire module (see functions ___render() > renderHeadContent() > ___getJsFile()). ProCache automatically merges and minifies all js/css files into one file only if in PW Admin > Setup > ProCache the "merge options" are checked BTW since my js/css files change from page to page, I uncheck all these "merge options" (as also advised in ProCache itself). In other words, I would like to have more control on what is loaded by PrivacyWire. Of course, if I uninstall the PrivacyWire module I don't get the HTTP request that retrieves the PrivacyWire.js/PrivacyWireUnstyled.js file.
  12. @The G I noticed of that config option, but the "one more HTTP request" is still performed either way by checking and unchecking the "Use ProCache JS Minification (if available)". I would like to merge the PrivacyWire JS code (PrivacyWire.js/PrivacyWireUnstyled.js) into my ProCache JS minified file. That is, I would like to make something like this: <head> ... <script src="<?= $procache->js([ ..., '../modules/PrivacyWire/js/PrivacyWireUnstyled.js' ]); ?>"></script> ... </head> And stop PrivacyWire to perform its "one more HTTP request" to get the PrivacyWire.js/PrivacyWireUnstyled.js file (ProChaced or not) since I load it myself. The point here is avoiding the "one more HTTP request". It's a matter of performance. IMHO A config option for this should be added or improved.
  13. @The G After your post I understood that only one of the mentioned JS files is required. In any case I would like to manage for less HTTP requests as possible. In particular, I would like to merge PrivacyWire JS code into the ProCache JS minified file, and make the same for the CSS. The following procedure makes PrivacyWire to work but still performing one more HTTP request for retrieving the JS file (PrivacyWire.js/PrivacyWireUnstyled.js) in combination with ProCache. In PrivacyWire config option, check "Render Banner and Header Content Manually" and uncheck "Add basic CSS Styling". In directory /site/css/, create the file PrivacyWire.css which includes the PrivacyWire CSS statements. In source code, add: <head> ... <link rel="stylesheet" type="text/css" href="<?= $procache->css([ ..., '../assets/css/PrivacyWire.css' ]); ?>"></script> <?php echo $modules->get('PrivacyWire')->renderHeadContent(); ?> </head> <body> ... <?php echo $modules->get('PrivacyWire')->renderBodyContent(); ?> </body> IMHO The above-mentioned PrivacyWire.css file, even if small sized, should be added in the PrivacyWire module directory by design. The issue is that PrivacyWire loads PrivacyWire.js/PrivacyWireUnstyled.js in all cases. Nothing stops it to perform the one more HTTP request to get the JS file. I would like to avoid this behaviour in order to merge the PrivacyWire JS and CSS code into ProCache JS and CSS chaining. With the above code I can do it for the CSS file but not for the JS file.
  14. @joshua thanks for the module. I unchecked the module config checkbox "CSS: Add basic CSS Styling" and added via <script> the PrivacyWire.js (which, as of module implementation, seems to include CSS itself), but the PrivacyWireUnstyled.js still loads in network (i.e. a HTTP request is made to get it). Is there a way to include "manually" all the JS files (including PrivacyWireUnstyled.js)? That is, to make possible something like this: <script src="/site/modules/PrivacyWire/js/PrivacyWire.js"></script> <script src="/site/modules/PrivacyWire/js/PrivacyWireUnstyled.js"></script> so it would be the developer choose to minify and merge files, and to manage for less HTTP requests. Maybe a config option?
  15. I'm struggling on this hook that would populate selectable pages in PageTable Edit modal form also when a new page is just created. $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { $page = $event->arguments('page'); // this is a PageTable page i.e. it's created through an InputfieldPageTable field $form = $event->object; if($form->hasField != 'selectable_page_field') return; bd($page); // e.g. output: Page('id' => 123, ...) $related_page = wire('pages')->get("template=tmpl-name, page_table_field.id={$page->id}"); bd($related_page); // output (when $page is just created/added): // => NullPage('id' => 0, ...) // output (when $page is reloaded e.g. the edit page form is refreshed): // => Page('id' => 456, ...) // // Note: get() behaves differently depending on the page process flow: add and edit! // The problem may be caused by the page_table_field (InputfieldPageTable field) which // doesn't create the page until e.g. the related modal window is closed and re-opened, // and/or save button is hit in it. //... }); As expected, the above hook runs every time the Page Edit form using selectable_page_field is rendered. However it doesn't get the $related_page during the creation time because get() returns NullPage(), but the same code does get $related_page in all cases other than the creation time e.g. in Page Edit view after refreshing or closing-opening the modal window. Is there a way to make the get() to work even during page creation?
  • Create New...