Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Jon

  1. Thanks for the input. I am now working on changing the system as per @Jan Romero I am reserving the spaces as soon as possible now by making a pending reservation and calculating that against existing bookings to work out availability. I am running a check before creating the pending reservation to make sure the spaces are still available. I can see the benefit of generating the space in advanced then removing them once booked but for this project is probably easier using the existing booking and calculating it that way.  

    @BitPoet Ive had a look at $database transitions and tried the example. I created the page foo but not bar then ran the example which generated foo-1. I was expecting this to roll back rather add the pages. Ill need to have a read up a bit more.

    With my pending payment what would be the best way to expire this after a set amount of time? I have timed the Worldpay payment page timeout and its over 20mins so I will need to hold the reservation for a least that. 

  2. Thanks for your comments, The problem we have is we are using legacy WorldPay gateway 😞 so customers are taken away from the website for the payment. The payment is processed before returning to the site at which point the spaces are updated. Its during the payment window when double booking are occurring. 

  3. Hello All,

    Looking for a bit advice I have a site setup which sells spaces, all the spaces are stored in a page as a number field when booking is made the x number of spaces are removed. However on the odd occasion we have ended up with double booking when 2 people book at the exact same time. Wondering what approach anyone would take to deal with this?

    Iam thinking something along the lines of locking the page until the booking has been complete with a time stamp the deal with abandoned payment.


  4. Hello All,

    I have started getting the following error when trying to add a image to a image field. This seems to just be effecting the field on 1 template any ideas and works on others? 

    Wrong parameters for ProcessWire\WireDatabaseQueryException([string $message [, long $code [, Throwable $previous = NULL]]])


    File: .../public_html/wire/core/FieldtypeMulti.php:345
    336:                if($exception) break;
    338:                $sort++;
    339:            }
    341:            if($exception) {
    342:                /** @var \PDOException $exception */
    343:                if($useTransaction) $database->rollBack();
    344:                if($config->allowExceptions) throw $exception; // throw original
    345:                throw new WireDatabaseQueryException($exception->getMessage(), $exception->getCode(), $exception); 
    346:            } else {
    347:                if($useTransaction) $database->commit();
    348:            }

    Also had SQLSTATE[HY000}: General error: 1364 Field 'tag' doesn't have a default value

  5. Hello,

    I have a live and staging site using the same database is there a way of using the live asset folder instead of uploading images to the staging and vice versa. Iam only really updating theme files so would like to keep any images rather than keep having to sync both assets folders.  



  6. 8 hours ago, Guy Incognito said:

    I think it could be because you are also using url segments. You can set the base URL for the page to be paginated when calling the pager. I can't seem to find the relevant docs at the moment but this is a snippet from a project I have open at the moment that I recall has the same issue that hopefully shows the syntax you need.

    $pagination = $articles->renderPager(array(
                        'baseUrl' => '/sector/'.$currentCat.'/'


    I tried this and get the same results

    2 hours ago, gmclelland said:

    What is the url for page2?


    Just reading up on whitelist now.

  7. Hello All,

    Iam having a slight problem with pagination, Ive setup a news page with pagination which works fine. I have also setup a segment that list all the posts for a set year using the same template. for example news/2018 when I try and display page2 I get a 404 any idea? 

    The code Ive used. 

    <?php if ($input->urlSegment1) {
               $start = strtotime(date("{$input->urlSegment1}-01-01"));
               $end = strtotime(date("{$input->urlSegment1}-12-31"));
                $results = $pages->find("template=news-item|news-item-right-gallery|news-item-left-gallery,  news_date>=$start, news_date<=$end, limit=15, sort=-news_date");
              $results = $pages->find("template=news-item|news-item-right-gallery|news-item-left-gallery, limit=15, sort=-news_date");
     foreach($results as $result) {?>
         News template
    <?php } 
            $pagination = $results->renderPager();
            echo $pagination; ?>



  8. 6 hours ago, Wanze said:

    The line in question is: 

    $isTranslatable = $info['translatable'] ?? false;

    The "Null coalescing" operator was introduced with PHP 7 - are you sure you're using PHP 7.2? 😉 

    Nope Iam no longer sure, turned out to be 5.6 set in cpanel and 7.2 in whm. 🤐

    Thanks for your help 🙂 

    • Like 1
  9. Hello,

    Iam just trying to install the module but getting the following error any ideas? :- 

    "Parse Error: syntax error, unexpected '?' (line 50 of /home/skyewalkerhostel/public_html/site/modules/SeoMaestro/InputfieldSeoMaestro.module.php) "

    Using PHP7.2 & PW 3.0.128

  10. Hello All,

    I'am struggling a bit (or maybe approaching this wrong). I've creating a simple events section which has a number of categories setup as pages. I've used a multiple Page Reference in the individual events to selects which categories the event may fall under

    I'am in the process of setting up sidebar which lists all the categories which is fine. Now i would like to have the number of events in brackets at the end. However I cant seem to check the page reference for the category page ID, Ive used the following code :-


    $cat = $pages->find("template=event_cat, sort=title, include=hidden");    
    foreach ($cat as $cats) {
    	$count = $pages->count("template=event, event_cat*={$cats->id},");
    	echo "<li class='uk-active'><a href='{$cats->url}'>{$cats->title} ({$count}) </a></li>";

    Is it something to do with using the ID with *=



  11. On 5/29/2018 at 2:57 PM, ethanbeyer said:

    @Jon this sounds a little strange. Reading most of your comment, I would think that this might have something to do with your Office365 having sending limits that you're going over. The TLS issue is what makes it weird, though - because if it was a limits problem, that would not be happening.

    Is there anything in the logs that gives what error is encountered, rather than saying it just stops sending?

    Hello Ethan,

    Nothing in the logs I've now setup sendinblue and this has resolved the issues so I assumes its 365 like you suggested. The limit would be odd though as its not sending out that many emails



  12. Hello, Ive but using the module for a few month now (its great thanks!)

    Over the last couple of weeks I have been experiencing problems. Iam using a office 365 exchange account, which just randomly stops sending. If I run the test is setting it fails. After that if I deselect TLS save a then retick TLS save and test it works again. Any ideas what may be causing this?

  13. Hello, just wondering if the following is possible ive setting up a uikit menu. I have adjusted the inter_tpl to wrap the some additional DIVs around the UL. Which works fine I also need to have the inner inner UL with a different DIV around them or at the very least just default back to a UL without the additional tags. Ive tried the following code but this seems to close the the first UL of the menu after the first dropdown occurrence

        $menu->addHookAfter('getInnerStringOpen', null, 'customInnerString');
        function customInnerString(HookEvent $event){
            $item = $event->arguments('page');
            if($item->numChildren(true) && count($item->parents) > 1){
                $event->return = '<ul class="testtest">';


    Iam trying to achieve this


      <li>Level 1 Nav</li>
      <li class="has-sub">Level 2
    		<div class="submenu">
        	<ul class="has-sub">
              <li>Item 2.1</li>
              <li class="has-sub">Level 3
                <div class="anothersub">
                    <li>Item 3.1</li>


  14. Hello All,

    Probably something simple but I cant for the life of my figure out what ive done!

    I have a live site set to default to HTTPS:// via .htaccess. I have taken a copy of the site defaulted the .htaccess file however the site is still adding HTTPS in front of the local path any ideas what ive missed? Iam using WAMP. I have installed a blank PW site to confirm that it related to the site rather than wamp setup



  15. Installed Tracy and can see the following error being thrown. Must be something to do with the amount of images added by the client 

    Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 23040 bytes) (line 330 of /home/glenetive/public_html/wire/core/ImageSizer.php)

  16. Hello,

    I've had a client create a page using a template which has been used a number of times before. I can view the page front end but when I try and edit via admin the page just constantly trys to load any idea?

    I've duplicated the page and get the same effect. I've created a new page using the same template which works fine also.


  • Create New...