Jump to content

androbey

Members
  • Content Count

    45
  • Joined

  • Last visited

Community Reputation

15 Good

About androbey

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @Mats thank you for this module! I noticed an issue when trying to crop images which where downloaded via this module on saving. The error said that the image could not be found. I assume this has to do with the page file name, which has a "." in its name, which seems to be a problem. I replaced the renaming with following line, which solves this problem for me. Maybe it's helpful for someone else coming accross this. $pagefile->rename(str_replace('.', '-', $pagefile) . ".jpg");
  2. Yeah, I thought of that and that is why I was asking. I once ran into a similiar problem, unrelated to ProcessWire. But maybe it helps when you have a look into "BOOLEAN MODE" on InnoDB, when trying to select with an "@" symbol.
  3. Hi @Pixrael, do you have some more information about the query which causes the error? Is it a 'SELECT' query?
  4. Hi @Markus (Blue Tomato), thank you for the update. I tested the new version and the generation and storage of the blurhashs works fine! On a side node, I find it still strange that the custom SQL did not (always) work. After upgrading my issue with "undefinded offset" was still present. I checked the used PHP Blurhash library and your code and I adjusted lines 108 and 109 and replaced $height and $width with $calcHeight and $calcWidth. This solves the issue (no more notices), but I don't know if it has any drawbacks..
  5. Hi @Markus (Blue Tomato), thanks for your reply. I tried again with an image found on the web, but no luck. createBlurhash for this particular image returns "LdLx}oxdzpwN}tNHNsbI#laxS}f*" (so at least seems to work?), but is not stored in the db. Image for this test: https://pixabay.com/get/53e2d14b4b5aaf14f6da8c7dda35367b1c3ddce05152774a_1280.jpg Maybe I can check tomorrow with a different test setup.
  6. Hi @Markus (Blue Tomato), I also think this is awesome! I wanted to try it, but I have some strange problems getting in running. I don't know if it is only me, but nevertheless I wanted to post here. Maybe someone can help. One strange issue at first: When an image is saved, the hash is not stored in the db table (although the "insertBlurhash" function returns true). And the second issue comes when calling the "getBlurhashDataUri" function. (I manually inserted the hash string to the database, because of the before mentioned issue). Then I'll get based on the image up to several 100-thousands warnings like "PHP Notice: Undefined offset: 208 in .../ImageBlurhash/ImageBlurhash.module.php:122". Maybe there is some config issue on my side or anything else I missed. But maybe someone has an idea. Btw. I checked it both on Windows and Linux with PHP 7.2 and latest ProcessWire dev version.
  7. Ok I found the reason why my modal does not really look like it should but I don't know why the condition is not met: https://github.com/processwire/processwire/blob/master/wire/modules/Jquery/JqueryUI/JqueryUI.module#L44 $adminTheme obviously does not evaluate to true, hence the vex theme is not set. But as I am in admin backend, it should evaluate to true, shouldn't it?
  8. This is strange. "vex" is defined and trying "ProcessWire.alert('test');" leads to a similiar result as in my screenshot above.
  9. Hi everybody, I am currently developing a configurable module (no ProcessModule). Some time ago I stumbled upon a forum post about using the VEX library in the backend. Now, I wanted to try this in my module. But with the example code I get an almost useless dialog: <?php //in init method $this->modules->get('JqueryUI')->use('vex'); //javascript ProcessWire.confirm('Are you sure you want to continue?', function() { //ok },function() { // canceled }); leads to following screen: There are no erros in console. I am using ProcessWire 3.0.148. Did I miss something or doing something wrong?
  10. @ro-bo, I tried it with ProcessWire version 3.0.148, hook code placed in ready.php and it works without any problems. Maybe a good idea is to use Tracy debugger, to get a hint where the problem lies.
  11. Hi Robert, on first look I didn't look to close to your code. Please try the following: wire()->addHookAfter("Pages::saveReady", function (HookEvent $event) { $page = $event->arguments("page"); if ( $page->hasField('my_repeater') ) { $repeater = $page->my_repeater; foreach ( $repeater as $item ) { $dateStart = $item->date_start; $dateEnd = $item->date_end; if ( $dateStart && $dateEnd && $dateStart >= $dateEnd ) { $item->date_end = ''; $item->save(); throw new WireException('start date must be earlier than end date'); }//endif }//endforeach }//endif }); Hope it helps.
  12. What does not work? Do you get any error? If you want to save the "date_end" field: Did you try to save the repeater item (also with output formating set to false)?
  13. Same as @Zeka I only have a related info (in this case a module). This would involve some (a lot) more work, since you would have to build your Idendity Provider (IDP) yourself, but may still be worth to check it out. https://modules.processwire.com/modules/saml-auth/
  14. I would suggest you to use the fantastic Tracy Debugger tool and try to find out whats going on. Maybe there is something else wrong. Does the page load normally if you comment those lines out where you are trying to get file URL?
  15. Hi @JeevanisM, did you declare $pagefile before the call of "httpUrl()"? Maybe there are even log entries which give more information. In general it depends on wether you set a specific format for that specific field (single element or array) how to get the URL of the file. Assuming that your file field is named "pdffile": Case 1 - Single element $pdfUrl = $page->PDFFILE->httpUrl(); Case 2 - Array You either have to loop through all files or e.g. to get the first file: $pdfUrl = $page->PDFFILE->first()->httpUrl(); You can check format settings on details tab of your field.
×
×
  • Create New...