Jump to content

Jon

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by Jon

  1. Have a few Module on the site:-

    • Formbuilder 
    • Hanna Code
    • Jumplinks
    • Persistent Login
    • Redirects
    • Tracy Debugger
    • Video Markup
    • ProFields
    • MarkupXML
    • MarkupSimpleNavigation
    • 404 Logger
    • Upgrades
    • Video or Social Post Embed 
    • Like 1
  2. Unfortunately nothing in the logs, the only error in both logs relates to the favicon

    It's a bit odd as it works perfectly on every other page; I've tried removing everything from the home template and just left the front-end edit code for the body field, but still nothing.

  3. Hello,

    I am having trouble getting frontend editing to work on the homepage of my site. Works on every other page apart from the homepage. It looks like maybe jQuery isn't being loaded. Do you have any ideas?

     

    Jon

  4. Thanks Both,

    I had trouble getting font awesome icons to work using the doc and found your earlier example in this thread. In turn, it seems I have ended up with old and new code. I have resolved the issue by following the docs and font awesome icons are now showing correctly. Code below for reference  

     

    $pdf = $modules->get('RockPdf');
    $pdf
    	->addFont(['R' => 'site/templates/fonts/fa-regular-400.ttf',
    			   'I' => 'site/templates/fonts/fa-regular-400.ttf',
    			   'B' => 'site/templates/fonts/fa-regular-400.ttf',
    			  ], 'far')
    	->addFont(['R' => 'site/templates/fonts/Roboto-Regular.ttf',
    			   'B' => 'site/templates/fonts/Roboto-Black.ttf',
    			  ], 'roboto')
    	->load("site/templates/change_management.php")
    	->save(preview: true);

     

    • Like 2
  5. Thanks gebeer,

    I am using the latest pro version. It works ok with the below code however, if I remove the addFont() line, it results in a 500 error. 

    $pdf = $modules->get('RockPdf');
    $pdf->settings([
    	'mode' => 'utf-8',
    	'fontdata' => [
    	'roboto' => [
              'R' => 'Roboto-Regular.ttf',
              'I' => 'Roboto-Regular.ttf',
            ],
    		'robotothin' => [
              'R' => 'Roboto-Thin.ttf',
              'I' => 'Roboto-Thin.ttf',
            ],
    	  'far' => [
    		'R' => "fa-regular-400.ttf",
    		'I' => "fa-regular-400.ttf",
    	  ],
    	],
    	 'default_font' => 'roboto'
      ]);
    
    	$pdf->addFont(['Roboto-Regular' => 'site/templates/fonts/Roboto-Regular.ttf',])
    	->load("site/templates/test.php", ['page' => $pages->get(1053),])
    	->save(preview: true);
    }

     

  6. Iam using the following code to generate my PDF in ready.php however after adding the pdf->settings I get a 500 error, Any ideas? 

    $pdf = $modules->get('RockPdf');
    $pdf->settings([
    	'fontdata' => (new \Mpdf\Config\FontVariables())->getDefaults()['fontdata'] + [
    	  "far" => [
    		'R' => "fa-regular-400.ttf",
    		'I' => "fa-regular-400.ttf",
    	  ],
    	],
      ])
    
    	$pdf->addFont(['Roboto-Regular' => 'site/templates/fonts/Roboto-Regular.ttf',])
    
    	->load("site/templates/test-document.php", ['page' => $pages->get(1053),])
    	->save(preview: true);

     

  7. 7 minutes ago, bernhard said:

    Hey @Jon sorry for the issue - didn't think of subfolder installations!

    Can you try to change this in InputfieldRockPageBuilder.js:351

    // from this
    $.get("/rpb-create-block/?field=" + field + "&name=" + name)
    
    // to that
    $.get(RockFrontend.rootUrl + "rpb-create-block/?field=" + field + "&name=" + name)

     

    Perfect thanks 🙂

  8. I seem to have an issue adding blocks, which I believe relates to my site directory being in sub-folders. The site is hosted at domain.com/client/site when I try and add a block, the following URL is being used domain.com/rpb-create-block/?field=rockpagebuilder_blocks&name=demo

    Any ideas?

     

  9. Hello, 

    I am putting together a navigation bar using $pages->get('/')->children which works, however if I visit the childpage of any page that has grand Children the navigation bar disappears because $pages->get('/')->children is returned empty any ideas? Full code below

    foreach ($pages->get('/')->children as $childPage): ?>
                      
                      <?php if ($childPage->hasChildren && $childPage->template != "news"){ ?>
                          <li class="nav-item dropdown">
                              <a class="nav-link dropdown-toggle" href="#" id="dropdown-<?= $childPage->id; ?>" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                                  <?= $childPage->get("nav_text|title"); ?>
                              </a>
                              <ul class="dropdown-menu" aria-labelledby="dropdown-<?= $childPage->id; ?>">
                                  <?php foreach ($childPage->children as $subPage): ?>
                                      <li><a class="dropdown-item" href="<?= $subPage->url; ?>"><?= $subPage->get("nav_text|title"); ?></a></li>
                                  <?php endforeach; ?>
                              </ul>
                          </li>
                      <?php }else {?>
                        <li class="nav-item">
                          <a class="nav-link" href="<?= $childPage->url; ?>"><?= $childPage->get("nav_text|title"); ?></a>
                      </li>
    
    
                     
                  <?php 
                  };
                 endforeach; ?>

     

  10. 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. 

  11. 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. 

  12. 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.

     

  13. 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? 

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

     

    File: .../public_html/wire/core/FieldtypeMulti.php:345
    
    335:                
    336:                if($exception) break;
    337:    
    338:                $sort++;
    339:            }
    340:        
    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

  14. 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.  

    Cheers

    Jon

×
×
  • Create New...