Jump to content

bramwolf

Members
  • Posts

    138
  • Joined

  • Last visited

Posts posted by bramwolf

  1. Hey Guys,

    I've been trying to migrate a website thats been running smoothly online for a long time but cannot for the life of me seem to get it right on the new server. I migrated all the files, created the new database and set it in the config file. The site loads, allows me to log in and so on but there is the problem that every page loads extremely slow and that pages that require bigger queries from the database timeout every time with this error:

    Request Timeout

    This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

     

    I've tried to migrate this site to two different hosting services by now and always run into the same problems. What could be happening here? I simply cannot think of a reason why a site would work perfectly fine and work this slowly and poorly after migration. Any thoughts?

    Any help would be much appreciated. Would be willing to pay for help if anyone feels like diving in.

    Thanks 🙂
    Bram Wolf

  2. Hi!

    Sorry for the late reply, I don't check here often nowadays. I'll attach a zip file with my related files, out of that you might be able to pick and choose what you need to get your setup running ?
    In the end a major issue for me was Mollies callback urls in conjunction with a multilanguage site. Originally they don't include the current users language extension, so site.com/en/payment or /de/ or /nl/. That prevented the script for running correctly. Once a added those. bases on the users current language in the callback URL I got things up and working ?

     

     

    PaymentMollie-PW3.zip

  3. Hey Guys,

    I've tried the module and it works well ? All the files are uploaded very quickly! So thanks you for that! ? However I can't seem to manage to get
    the module to behave the way it does in your examples. I've used the frontend scripts from the examples, they are unedited and original.
    At first the area where selected images would show after being selected is already visible,
    when I open the page. After the images are uploaded I never get to see them. Also it doesn't show images that are already uploaded to the directory.
    I check the user privileges of the folder being used and they all have 755 access, so that shouldn't be the problem? I also tried with a custom folder

    /templates but with the same result.

    729774837_Schermafbeelding2021-09-13om11_14_57.thumb.png.df8787c0865b4e37eb3686bbaf231577.png


    Also when I set:

    		'enableDropZone' => 1,// render a drop zone where files could be uploaded via 'dropping'

    to "0" the dropzone just stays visible in a a slightly different way.
    1678057665_Schermafbeelding2021-09-13om11_21_10.thumb.png.33339344d270febd14574f4d16bfa4b3.png


    I feel like it's not fully working, How can I check / improve it's functoinality to make sure these features work like they are supposed to? ?
    I would like it to look and work like this example does: Just a select button and showing uploaded files :)

    https://blueimp.github.io/jQuery-File-Upload/


    Thanks in advance!

    Bram

  4. Hi Guys,

    I found here: https://processwire.com/docs/selectors/#finding2 that I can exclude results from my $pages->find($selctor); query by using parent!=123 ( parent ID ) But I was wondering if I can
    also do so based on the parent template? I've tried doing it by itterating over the matches array and dropping the matches with the parent but since the result is limited for use with the paginator
    it only drops the items from the batch displayed on this page. Say from the results within matches 0 - 20 and not the entire 0 - 220.

    Anybody have a idea of how to achieve this? ?

    Thanks in advace!
    Bram 

  5. Hey Guys,

    I'm working on deploying a portal like website which will allow different companies to log into the portal and end up on their own version of the site.
    I was wondering if you could give me some advice on how to structure this. These are the goals I have in mind:

    - Every company that uses the portal should have it's own version of it, preferably it's own database 
    - I want to use the same template files for all the instances of the site for all companies
    - One company should NEVER be allowed to use the portal of a different company

    I was thinking of creating main pages with the names of the companies and have all other pages with the same templates as always copied 
    to be children under that page. So for instance:

    - Home
         - Company 1 ( company1.portal.com )
              - Portal Home
              - Portal Content
              - Portal Contact
         - Company 2 ( company2.portal.com )
              - Portal Home
              - Portal Content
              - Portal Contact

    If using the same database I could give all user account a code that refers to their company part of the portal
    so if user xyz logs in and had the company code "company2" they would get sent to the Company 2 portal.
    But I'm not sure how safe this is?

    Any suggestions or ideas of how to handle this best?
    Also I was wondering if it is possible to create the company1.portal.com domains without adding DNS records to my hosting account constantly?

    Any tips or suggestions will be greatly appreciated :)

    Grts, Bram

  6. Hi Guys,

    I found that my site is producing this notice on the front end, even when $config->debug = false and also when admin is
    not even logged in. How do I keep the site from displaying this message to front end users? The notice is about a few vars
    being tested, which in this case aren't defined, how would I stop that from happing all together when testing vars? if I for instance
    wrap the $discountCode = blabla in a if($order) { ...  } statement than I'm again testing for $order which isn't a object in this case
    which throws another notice..

    This is the notice:
    1067507995_Schermafbeelding2020-05-04om10_51_20.thumb.png.79d7382001c96ee91562ab50619d4a32.png

    Here is my current code:

    // PAD DISCOUNT CODE HOOK
    	
    		// First we see if we have active discount code
        	if ($this->session->orderId) {
        	  $order = $this->pages->get($this->session->orderId);
        	}
    	
    		if($product->geen_korting == 1) {
    			$nodisc = $product->geen_korting;
    		} else {
    			$nodisc = $product->parent->geen_korting;
    		}
    	
    	   	$discountCode = $this->sanitizer->selectorValue($order->pad_discount_code);
    		$dc = $this->pages->get("template=paddiscount, title=$discountCode");
    	
    	    if ($dc->id) {
    	
    	  		if ($nodisc) {
            		$discount = 0;
          		} elseif ($dc->pad_percentage) {
            		$discount = $newprice * ($dc->pad_percentage / 100);
          		}
    		}
    
        	$event->return = $newprice - $discount;


    Thanks in advance ?

  7. Hi Krlos,

    I did get it to work in the end! I used the onepagecheckout template found in padloper. I will send you a zip file with all modules en templates of my site needed for this integration you can just copy the Mollie module in it's entirety. Be sure to select it in PaymentModule. Yoiu can check my checkout scripts on how I invoked Mollie. You can copy what you need from my files and stitch your own version of the integration together ? Hope this helps!

    Grts,
    Bram

  8. Thank you sooo much for this!! Truly super helpful, I've been trying to implement that precise script for two days, since I didn't know you had already done it, and failed! ?

    thanks! ?

    I do however have a few questions O:) 

    I've been playing around with the config options but can't quite get the script to do what I want,
     I currently have:

    $options = array(
    	'showUploaded' => true,
    	'uploadsDeletable' => true,
    	'showUploaded' => true,
    	'setMaxFiles' => 9999,
    	'setOverwrite' => false,
    );

    But after the upload the script doens't show the files I uploaded, Nor do I see links to the files opening in a Gallery.
    Also I've not managed to upload more than 50 files at once, the rest of the upload seems to just get dropped.

    What settings would I have to use to:
    - See the images already in the folder
    - See the images after uploading with link to open them in a gallery?
    - Actually upload 9999 files?

    Thanks in advance! ?

    • Like 1
  9. Hi Guys,

    I've read all the info in this thread but since half is about the umlaubt and half about the content type I can't realy figure out if and how this was solved.

    This is what I get out of WireMail:

    Content-Type: text/html; charset="utf-8"
    
    Content-Transfer-Encoding: 8bit
    
    
    
    <p>Beste Bram,<br /><br />
    Er is een account voor je aangemaakt op: portal.bewakingsgroep.nl<br /><br />
    Je gebruikersnaam is: brammus<br />
    Je wachtwoord is: 2c9c3s2EgAm4<br /><br />
    Na het inloggen zal je gevraagd worden een nieuw wachtwoord op te geven.<br />
    Onthoud dit wachtwoord goed en deel het met niemand.<br /><br />
    Vriendelijke groet,<br />
    Tonny Jacobs<br /><br />
    Bewakingsgroep.nl</p>

    Does anyone know how to fix this? I've already tried the suggested updates to WireMail and the version from the repository to no avail :\

    Thanks in advance!
     

  10. I checked a email from the frombuilder and got the same result.

    756290125_Schermafbeelding2019-06-05om15_04_54.png.f40991e7764580b43f4f487a966c5b9b.png

    I never had this problem before with any other processwire sites I have. Any ideas on what could cause it?
    Thanks in advance ?

  11. I tried it with a Gmail account but got the same results. It's like the header isn't configured properly?
    the encoding type should be sent as a header not as the  message. However I don't know why that
    is happening or where I could change it.. ?

  12. Well, here we go again. I was testing to see if the Mollie module works and got this error on the checkout page:

     

    Checkout

    Warning: include(/customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/../../src/MollieApiClient.php): failed to open stream: No such file or directory in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php on line 444 Warning: include(): Failed opening '/customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/../../src/MollieApiClient.php' for inclusion (include_path='.:/usr/share/php') in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php on line 444

    I checked to see but the files it is referring to, like:
    /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie-PW3/vendor/composer/ClassLoader.php

    Is actually right there. Any ideas on how to fix that? ? Thanks again guys.

  13. On 5/1/2019 at 7:50 PM, MoritzLost said:

    @bramwolf Pretty sure that BitPoet is right. That error indicates that the class ProcessWire\PaymentModule doesn't exist. If you installed the PaymentModule through the backend or downloaded it from the module page, you would get the master branch, which doesn't have the correct namespace. So this version of the module would have the \PaymentModule class inside the root namespace, but not inside the Processwire namespace (which is what the PaymentMollie module tries to extend). Install the PW3 branch and you should be fine.

    Crazy!! ?  You fixed my problem ^_^ First, I just updated to already installed files of PaymentModule and PaymentInvoice to the PW3 versions, which crashed everything ? Than uninstalled both modules, updated the files and reinstalled them. Afterwards, I installed the MollieModule and now it worked fine! ?

    Thank you so much, now let's see if I can actually get it to work with the vendor files from composer ?

    • Like 1
  14. @MoritzLost thanks for your offer! ? However, i'm not planning on reinstalling Processwire inside composer, and also I don't need composer for anything other than this module so I decided to bedug the adapted PaymentMollie module instead and use prepackaged files provided by the original Mollie package from github.

    So to be clear, I'm trying to install this module ( Mollie compatible with Padloper )

    https://github.com/Typografics/PaymentMollie-PW3

    With the composer vendor files from this package ( The original Mollie api )
    https://github.com/mollie/mollie-api-php


    The error I get after upload the files and going to the "Install Module" page is this:
     

    Fatal Error: Uncaught Error: Class 'ProcessWire\PaymentModule' not found in /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie/PaymentMollie.module:7
    Stack trace:
    #0 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(1545): include_once()
    #1 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(2842): ProcessWire\Modules->includeModuleFile('/customers/a/4/...', 'PaymentMollie')
    #2 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Modules.php(3023): ProcessWire\Modules->getModuleInfo('PaymentMollie', Array)
    #3 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/modules/Process/ProcessModule/ProcessModule.module(380): ProcessWire\Modules->getModuleInfoVerbose('PaymentMollie')
    #4 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/modules/Process/ProcessModule/ProcessModule.module(343): ProcessWire\ProcessModule->renderList()
    #5 /customers/a/4/3/big-in-fabric.com/httpd.www/wire/core/Wire.php(380): ProcessWire\ProcessModule->___execute()
    #6 /customers/a/4/3/big-in-fabric.com/ (line 7 of /customers/a/4/3/big-in-fabric.com/httpd.www/site/modules/PaymentMollie/PaymentMollie.module) 
    
    This error message was shown because: you are logged in as a Superuser. Error has been logged.

    I have the PaymentModule installed and am using version 3.0.123 of Processwire, the module requires version 3.0.90 at least.

    This is the start of the PaymentMollie.module file:
     

    <?php namespace ProcessWire;
    
    // Here you can find more information about the Mollie php api https://github.com/mollie/mollie-api-php
    
    require_once __DIR__ . "/vendor/autoload.php";
    
    class PaymentMollie extends PaymentModule
    {
    
        public static function getModuleInfo()
        {
            return array(
                'title' => 'PaymentMollie',
                'version' => '0.0.2',
                'summary' => 'Mollie Payment method',
                'singular' => false,
                'autoload' => false,
                'requires' => 'ProcessWire>=3.0.90, PaymentModule',
            );
        }


    Anybody had any clues? ? thanks again


     

  15. Actually it's this one: https://modules.processwire.com/modules/payment-mollie/
    I think it has been adjusted from the original a bit to work with Padloper.
    I tried installing it manually but Processwire gives me the Error that the module "PaymentModule" which
    is needed by the module mentioned above can't be found, even though it is installed.

    As for composer. I think I can download the installer file and run it with some commands from a shell connection,
    however I don't even know where to put this without breaking the site. Site/modules seems the obvious place to put
    it but that will result in Processwire always showing it in the modules to be installed page? Or maybe i'm completely wrong..

  16. Hey Guys,

    I've been trying to install the Mollie-Payment module for apeisa's PaymentModule, but apparently I cannot get it to work without Composer. 
    I've have no real clue of what it is or does, everything written about it confused me a complete 100% and I don't know how to install it.

    Could someone please give me some basic stept as to how to install this fucking thing onto my existing Processwire install? ? 

    Any help would be greatly appreciated!

     

  17. Hi Guys,

    In short: I would like to base the template and parent of the imported pages to be based on values in the csv

    Great work on the module Ryan, it's a very useful extension to Processwire indeed! ? 
    I was wondering if it would be possible to set multiple templates for the pages that are created, maybe based on a .csv field value?

    I'm using Padloper for variation products which ends up looking like this:

    - Parent Product Page       ( needs productprarent template )
         - Variation child page   ( needs variation template )
         - Variation child page
         - Variation child page

    so In my cvs file I guess I would use something like this?

    Type          template               title              color               price            image
    Parent       productparent      T-Shirt                                5   
    Child         variation                T-Shirt         Blue                                     templates/img/blue.jpg
    Child         variation                T-Shirt         Red                                      templates/img/red.jpg
    Child         variation                T-Shirt         Green                                  templates/img/green.jpg   

    This way I could create a parent of all sets of children, if values aren't filled there the system uses the price of the parent.
    I was thinking of something in de lines of:

     

    if($CsvLine->type == "Child") {
        $page->parent = $parent($CsvLine->title);
    }


    if takes makes any sense :')

    Do you think something like this could be done?

    Thanks in advance! ?
    Bram

     

    • Like 1
  18. Thanks man ?

    Never knew this was possible. I was going for dynamic loading of the title for each page loaded through the iframe but again I don't think that is possible since the frame and page are on different domains.  So I just decided to give the iframe the same title as the page loaded. Which is already not bad since a Web alias provided by my host just copied the original url to the title. 

     

  19. Hi Guys,

    I've been trying to figure out how I can get the iframe to show the title of the page it is loading. 
    I was thinking in the lines of a jQuery script that adds a title attribute to the iframe of maybe a addition
    to the header line in .htaccess? Does anybody have a clue of this would be possible? ?

    Thanks in advace!

  20. Hi Guys,

    I'm looking for a bit of input to find out what might be the best option for what I'm trying to achieve.
    What I want to create is one site, approachable from two domains. Domain1 should have the entire
    normal processwire site, and domain2 should be an almost exact copy of the original but with slight
    differences. 

    The things that should be different on domein2:
    - On domain1 there are a lot a vacations available, all of these have their own page with all the info
       Including a checkbox field. If this field is checked it should be displayed on domein two otherwise it should be skipped
    - Domain2 should have different contact info on the contact page from domain1
    - If the data from domain1 changes, this should automatically be reflected in domain2

    It feels to me like I wouldn't need a entire MultiSite since I basically would want to show the site exactly as it is on domain1
    but with a few conditions. 

    I was thinking along the lines of:
    redirecting domain2 to domain1, and have the URL mask domain1. And in the template add something like this:

    if($_SERVER['SERVER_NAME'] == 'domain2.com'){
       $domain2 = true;
    } 
    
    if($domain2 == true && $page->checkbox == 1) {
    // show conditional domain2 content
    }
    

     

    And for the contact page maybe a second set of fields also embedded into the contact template?
    Again if $domain2 == true show the second set, otherwise the original set of contact fields.

    Does anyone think this is indeed the way to go, or have any better ideas of how to approach this? ?
    Any insights are greatly appreciated ?

    Thanks!

    Bram

     

×
×
  • Create New...