Jump to content

Krevolution

Members
  • Posts

    3
  • Joined

  • Last visited

Krevolution's Achievements

Newbie

Newbie (2/6)

2

Reputation

  1. @Sebi i'm trying to delete a page using the api like so: public static function deletePage($data){ if(property_exists($data, 'clients')) { foreach($data->clients as $client) { if ($client->changeType == 0) { if(property_exists($client, 'id')) { $p = wire('pages')->get($client->id); wire('pages')->trash($p); } } } } } 'package' => [ ['OPTIONS', 'update-package', ['POST']], ['POST', 'update-package', Package::class, 'updatePackage', ["auth" => false]], ['DELETE', 'delete-page', Package::class, 'deletePage', ["auth" => false]] ], for some reason I get an error -> "Trying to get property 'id' of non-object" After some research I found that the error is located in the isDeletable check from pagesEditor inside the wire. more specifically the last else if check. When I bypass this whole block it works to delete so the id is fine. Any suggestions? Kind regards.
  2. [SOLVED] found a fix myself I followed: https://medium.com/@ajtech.mubasheer/setup-https-in-xampp-for-localhost-bc3d01393f31 to allow https as localhost for my xampp setup and I can now do api calls to https:// ?
  3. Hello everyone, I'm having a problem when trying to make a request to the API using HTTPs. Whenever I use HTTPS to make the request I get an object not found error. When using HTTP I don't have such an error. However I require HTTPS to make authentication calls from outside processwire with double JWT token. I use XAMPP to set up my localhost. I did redirect my localhost to use a domain name and also had to use a different port (other than default) for my mysql port since I already had something listening to the default port. Accessing my processwire application from localhost works with https but it is not secure. Any of you know what i'm doing wrong? Kind regards,
×
×
  • Create New...