Jump to content

Jon

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by Jon

  1. I eventually tracked down the issue, it related to a historical version of proDrafts. Once draft was unticked front-end editing worked ?.
  2. Yes, that's correct; I have even removed all template code and replaced it with basic HTML, including the edit php and got the same result. Works on all pages apart from home or ID 1
  3. I have done all of the above and still can not get the home page front-end editing to work. The editable area on the home page isn't getting wrapped in the pw-edit id. Any other ideas?
  4. 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
  5. 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.
  6. 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
  7. @bernhard That's brilliant. Thank you for the update!
  8. 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);
  9. 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); }
  10. 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);
  11. Brilliant thanks Ill grab that now ? Permissions look ok. Just appears jQuery isn't loaded
  12. Fixed the issue perfectly thank you The only other issue I have is Alfred not loading on the homepage of an existing site I've adding RockBuilder to, loads and works on all other pages just not the home page. Tested on a fresh install which worked as expected. So something within my site
  13. 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?
  14. Ah thank you, I had used $pages as a variable else where in the template for the parent pages doh. Thank you!
  15. 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; ?>
  16. Hello, I am wondering how I can show a field based on a options fieldtype that contains multiple values? Sorry solved that I was having a moment! ,?
  17. 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.
  18. 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.
  19. 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.
  20. Manged to resolve this by deleting the tag field within the database, May have been something to do with a "Image Extra" field.
  21. Thanks Elabx, I tried this but still having the same issue. " SQLSTATE[HY000]: General error: 1364 Field 'tag' doesn't have a default value"
  22. 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
  23. Brilliant thank you that's perfect saves a lot of effort ?
  24. 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...