Jump to content

da²

Members
  • Posts

    244
  • Joined

  • Last visited

  • Days Won

    3

da² last won the day on December 7 2023

da² had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

da²'s Achievements

Sr. Member

Sr. Member (5/6)

151

Reputation

  1. Hello @BrendonKoz, On the code above I didn't copy the namespace and use statements but this is not the issue, instead of using ProcesswireTemplate I can directly use strings but this is not working either. EDIT: I've edited my code to remove this ambiguity, using strings instead of class ProcesswireTemplate.
  2. Hi, I post here before to report an issue, just in case I'm missing something (using PW 3.0.229). To create instances of a custom page class, I'm adding a static method on it: class IndividualCarChoicePage extends Page { public static function create(UserPage $user, ChampionshipPage $championship): void { $carChoiceParent = wire()->pages->get("parent_id=$championship->id, template=individual-car-choices"); $carChoicePage = new IndividualCarChoicePage(); $carChoicePage->of(false); $carChoicePage->template = "individual-car-choice"; $carChoicePage->parent = $carChoiceParent; $carChoicePage->title = $user->displayUsername; DevUtils::prettyPrintObject($carChoicePage); exit(); } } But the template is not defined: ProcessWire\IndividualCarChoicePage Object ( [id] => 0 [name] => [parent] => /assetto-corsa-competizione/championnats-acc/championship/choix-de-voiture/ [template] => [title] => MyName [data] => Array ( [title] => MyName ) ) And then the admin is corrupted: The blue page is the parent page of the newly created, you see the arrow on left indicating it has a child, but this child is not displayed. And there's not way of solving this issue, I can not delete the parent page "Choix de voiture", the trash refuses to delete it! Now, if I move this code to another class, that is not extending Page and not located in /site/classes/ directory: IT WORKS! The new page is created with its template. Why?
  3. About using Paypal for payment, better solution than using payment buttons is to use Paypal checkout SDK. Then you can dynamically create any order you want and validate the payment. EDIT : this SDK is now deprecated and replaced by REST API.
  4. Hello @HarryWilliam It looks like padloper is a e-Commerce module.
  5. @hellomoto It's a common error. You are outputting data before the headers, but headers must be the first thing to output. Headers are sent by ProcessWire, but you echo something before to include PW: $boot = realpath($boot); echo $boot; // DO NOT echo something... require_once $boot;// $pw_dir.'/index.php'; // ...BEFORE PW sent headers. Also why do you use this code and not a simple include at start of file? include __DIR__ . "/../index.php";
  6. Hello, Is your template named "repeater"? (I don't really understand the "page object class: RepeaterPage" here, I don't see this information on my side but am not on last PW version, I imagine this is the custom class associated with this template, but RepeaterPage is a PW class)
  7. Hello, The pw-replace must be in template-file.php and the id in _main.php. Documentation.
  8. Nice, for a beginner it's a nice way to quickly discover PW mechanics. And probably an experimented user can also find some interesting features he doesn't already know (I already see some of them). 🙂
  9. On my side I use a script to upload site, there's 2 parts: - A Ant project that synchronizes some folders/files from the source code to a "target" directory, add a version number and transpile SCSS to CSS, TypeScript to JS... - A bash script that runs the Ant project, and if no error, use rsync to synchronize only changed files with the production server. It uses a file listing exclusions so I'm sure the site/config.php will never be uploaded, like the sessions or the cache. This script is a Linux one because Linux have those powerful integrated tools like rsync, but I'm running Windows and executing the script with Microsoft Linux WSL. I have another bash script for staging server, it's the same as for production except it also pushes a clean version of my local ProcessWire database to the staging server.
  10. You can do it with a module or manually. https://processwire.com/modules/process-wire-upgrade/ https://processwire.com/docs/start/install/upgrade/
  11. If you don't want to add a library, why not using a simple XHR? That's only a few line of JS and PHP. On what part are you struggling exactly?
  12. Hello, updating PHP means you need to install a newer version of PHP, it's not directly related to ProcessWire in first instance. It depends of your OS (Windows, Linux), it also depends if this is a shared host or a dedicated server. In a shared host you usually have an administration interface provided by your hosting service to manage your server. In a dedicated server you generally do everything yourself. About ProcessWire you have to check that the currently installed version is compatible with the PHP version you plan to install. Probably it won't be OK because you talk about years. If you plan to install PHP 8+ you'll also need to upgrade PW.
  13. @August I use PhpStorm, in my commit window I just have to right click a file or a set of files, and create patch: Of course you can do the same with vanilla git tools, by command line or probably with Git GUI.
  14. @August Because I'm using big tables that are filled dynamically and locked in admin and the result is a horizontal scrollbar on the whole page: In that case I create a git patch file, so if I update PW to a version that doesn't fix the issue, I then apply the patch. I also document on my wiki what's the goal of each patch.
  15. Hello @August Maybe you can add your suggestion to my issue report.
×
×
  • Create New...