Jump to content

markus_blue_tomato

Members
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by markus_blue_tomato

  1. Currently I am developing a new very small and simple ProcessWire Website with PHP 8 (and I try also enabled JIT) - planned go live Jan/Feb 2021.

    But for some older bigger Project with many modules and code which is on 7.4 I'll wait some month to upgrade since I had some troubles with php-redis and imagemagick with php8, which I use in this project

    • Like 4
  2. On 11/18/2020 at 5:38 PM, Martin1 said:

    Here I was referring here to the Stripe package for Form Builder, but I searched a bit more and he also made another solution with the GoogleClientAPI: https://github.com/ryancramerdesign/GoogleClientAPI/blob/master/GoogleClientConfig.php

    @markus_blue_tomato if there was a way like this to install the dependency from the module's config screen, would you accept a pull request for this?

    Sure you can :-)

  3. 22 hours ago, elabx said:

    Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this.

    Doing this at the end of the controller:

    
    if($input->urlSegment1) {
       $pageOnSegment = getPageToRender(); 
       $view->set('page', $page);
    } else{
       throw new Wire404Exception();
    }

     

    Hm, not yet... Maybe @Wanze has an idea?

  4. On 11/7/2020 at 5:50 PM, Wanze said:

    The module uses an object "PageFieldValue" which holds the hydrated data from the database and gets initialized by the fieldtype: https://github.com/wanze/SeoMaestro/blob/master/src/PageFieldValue.php

    Each meta data group has its own class to render specific data, e.g. this one for the "meta" group: https://github.com/wanze/SeoMaestro/blob/master/src/MetaSeoData.php

    Hope that helps a bit ?

    Thanks! I have created a PR with a fix: https://github.com/wanze/SeoMaestro/pull/27

    • Thanks 1
  5. On 11/1/2020 at 11:10 PM, Wanze said:

    I would have to look how ProcessWire handles this case, not sure if it's easily doable. Currently, I don't have time available, if you'd like to take a look - I'm happy to merge a pull request ?

    Cheers

    Sure, didn't find yet where the output happens of the meta data.

    How do you add the meta property to the Page?  I only know this way: https://processwire.com/api/ref/wire/add-hook-property/ but did not found it in the code

  6. Hello!

    I have a problem with the display of getModuleConfigInputfields. With this code, the Inputfields are not shown.

    When I remove "namespace ProcessWire" it works, but then the first request needs 1.5 minutes for the compilation.

    Does anybody knows what the .... is going on here? I am getting a little bit crazy ?

    <?php
    
    namespace ProcessWire;
    
    class ElasticsearchFeeder extends WireData implements Module, ConfigurableModule
    {
    
    	public static function getModuleInfo()
    	{
    		return array(
    			'title' => 'ElasticsearchFeeder',
    			'class' => 'ElasticsearchFeeder',
    			'version' => 134,
    			'summary' => 'Schema-flexible module for getting your page into ElasticSearch',
    			'href' => 'https://github.com/blue-tomato/ElasticsearchFeeder/',
    			'singular' => true,
    			'autoload' => 'template=admin',
    			'requires' => [
    				'PHP>=7.0.0',
    				'ProcessWire>=3.0.133'
    			]
    		);
    	}
    
    	public function init()
    	{
    	}
    
    
    	public static function getModuleConfigInputfields(array $data)
    	{
    		$inputfields = new InputfieldWrapper();
    
    		$field = wire('modules')->get('InputfieldText');
    		$field->name = 'headline_default';
    		$field->label = "Please enter the promo headline:";
    		$inputfields->add($field);
    
    		return $inputfields;
    	}
    }

     

  7. On 10/21/2020 at 1:01 PM, Beetrootman said:

    Hi,

    I'm getting an error when trying to use this module:

    
    Erreur fatale: Uncaught Error: Class 'kornrunner\Blurhash\Blurhash' not found in site/modules/ImageBlurhash/ImageBlurhash.module.php:245
    
    #0 site/modules/ImageBlurhash/ImageBlurhash.module.php(71): ImageBlurhash->createBlurhash('/customers/a/6/...')
    #1 wire/core/Wire.php (397): ImageBlurhash->hookSavePageField(Object(HookEvent))
    #2 wire/core/WireHooks.php (927): Wire->_callMethod('hookSavePageFie...', Array)
    #3 wire/core/Wire.php (465): WireHooks->runHooks(Object(FieldtypeImage), 'savePageField', Array)
    #4 wire/core/PagesEditor.php (849): Wire->__call('savePageField', Array)
    #5 wire/core/Pages.php (ligne 245 de site/modules/ImageBlurhash/ImageBlurhash.module.php)

    Any ideas what's causing it?

    This module requires https://github.com/kornrunner/php-blurhash.

    The best way to install ImageBlurhash is to install it via composer: 

    composer require blue-tomato/image-blurhash

    This install also all dependencies

  8. 10 hours ago, bernhard said:

    Hi @markus_blue_tomato

    just wanted to let you know that I got rid of the errors ? I used 1600x900 for the blurhash which led to the errors on the one hand and also to a huge filesize on the other hand. Changing the blurhash size to 16x9 solved both issues.

    I didn't want to use a small hash at first, because the images are part of a slider and the small hash messed up the design. I also didn't want to code things into css. I ended up setting the width of the hash as style attribute. Seems to work fine and got the document size from 1MB to 25kB ?  

    Haha great, and sorry - I completely forgot the issue due some spontaneous new ProcessWire side project for the guest registration in Vienna/Lower Austria:
    https://www.heute.at/s/cowirtat-hilft-bei-der-registrierung-im-gasthaus-100106087

     

    • Like 3
  9. ProcessWire: ProcessPageEdit: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/MYATA0YA' (Errcode: 13 - Permission denied)
    ProcessWire: ProcessPageEdit: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/MYJoge1O' (Errcode: 13 - Permission denied)

    Hello, does anybody know what this Error mean? I get this when I want to edit a page.

    Never had this since yet.

  10. Did anybody here developed a ProcessWire Site with Recurring Payments / Subscriptions?

    I have an idea for an B2B service where companies can register themselves and if they have an active subscription they can access some specific content. They can also cancel the subscription every month.

    I looked and SnipWire/FormBuilder but found nothing about Recurring Payments.

  11. On 9/18/2020 at 11:22 PM, bernhard said:

    I'm getting the error with the default Windows desert sample image when using this:

    
    $hash = $page->pic()->getBlurhashDataUri($page->pic()->width, 100);

     

    Desert.jpg

    I will take a look into it this week. In the meanwhile you try to create the blurhash based on a smaller size.

    I make this on also every blurhash pic on blue tomato

    E.g.

    // original pic size: 500/200
    $hash = $page->pic()->getBlurhashDataUri(50, 20);
    • Like 1
  12. On 8/12/2020 at 11:52 PM, Craig said:

    I got this too, and it seems to happen when passing fraction values to getBlurhashDataUri() - these were calculated for an image ratio (e.g. $height = $width * 0.35).

    If you're doing this, try passing whole numbers, or rounding the calculated dimension first (using floor, round, ceil functions):

    
    $image->getBlurhashDataUri(95, floor(95 * $ratio));

     

    Thx, I pushed a fix for this by rounding width and height directly in getBlurhashDataUri

    • Thanks 1
×
×
  • Create New...