-
Posts
35 -
Joined
-
Last visited
About PascalKonings
- Birthday 08/09/1981
Profile Information
-
Gender
Male
-
Location
The Netherlands
Recent Profile Visitors
1,644 profile views
PascalKonings's Achievements
Jr. Member (3/6)
9
Reputation
-
I just upgraded a 3.0.210 version PW website to the latest master (3.0.229). I renamed the old wire folder, replaced it with the 229 version, and went into the admin panel. After a few update messages and refreshes, all seemed fine. Pages are loading properly and can be edited as usual. However whenever I now try to view any log or message under setup, and also certain fields, I'm getting the following error: Fatal Error: Uncaught Error: Class "._InputfieldDatetimeText" not found in wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module:216 I'm not sure what's wrong here, the ._InputfieldDatetimeText file seems to be present. Is this a bug?
-
@Sebi Any chance you have time to take a look at my issue above?
-
@Sebi I'm running into a problem deleting a repeater item through the API, or any page for that matter. Using my code below I'm getting an error public static function deleteEvent($data) { $data = AppApiHelper::checkAndSanitizeRequiredParameters($data, ['id|int']); // $data->id returns an integer wire('pages')->get($data->id)->delete(); // Using a static ID also fails // wire('pages')->get(1066)->delete(); return [ 'message' => 'deletion successful', 'status' => 200 ]; } The error I'm getting is: devmessage: {message: "Trying to get property 'id' of non-object", location: '/myDev/wire/core/PagesEditor.php', line: 296} error: "Internal Server Error" This line is within the isDeleteable function, where it tries to get the ID of the page that needs to be deleted, however it seems the $page: else if($page->id === $this->wire('page')->id && $this->wire('config')->installedAfter('2019-04-04')) { $error = "it is the current page being viewed, try \$pages->trash() instead"; } I've set up the route without any auth or roles, so it should work from that perspective. Other routes getting and posting are working fine! And running the API from the template directly works perfectly: wire('pages')->get(1066)->delete(); Am I missing something here?
-
Hi Bill, yes it is an object and contains an id and all other information in the repeater field. Deleting it using @Jan Romero suggestion still throws me an error in the module "App API" that I'm using to delete this item: devmessage: {message: "Trying to get property 'id' of non-object", location: '/Applications/MAMP/htdocs/hkg/wire/core/PagesEditor.php', line: 296} error: "Internal Server Error" However deleting it from PHP without the module using: wire('pages')->get(1372)->delete(); seems to work fine. And it is the exact same code as in my App API endpoint. Must be a bug in the module then...
-
After searching through this forum and not being able to find a working solution, thought I'd try it here. I must be overlooking something really simple. I have a template with a repeater field, containing a number of items. I want to use the API to remove one of these items, based on its ID, save the repeater (if necessary) and then save the page on which it resides. // The page with template "agenda" $agenda = wire('pages')->find("template=agenda")[0]; // The event field is the repeater field here // Getting the repeater item by ID $event = $agenda->event->get('id='.$id); // Disable output formatting $agenda->of(false); // Remove the event item from the event repeater $agenda->event->remove($event); // Not sure if this is needed // $agenda->event->save(); // Save the page $agenda->save(); Sofar I'm getting this error: Trying to get property 'id' of non-object Which seems to be because of the remove action: $agenda->event->remove($event); If I remove this line, all seems to work as intended, but obviously the repeater items is not being removed. What am I missing here?
-
@ryan @Sebi Found it! I had maxUrlSegments set to 2 in my config file #doh
-
@Sebi Thanks for this great module, I'm testing it for a project right now. However I'm running into a slight problem, not sure if this is a bug or it's something on my end. I'm testing it on two PW 3.0.165 instances and in one of them everything works perfect. In the other I can't seem to edit an application to set an apiKey in the admin. When clicking it (/processwire/setup/appapi/application/edit/1) it renders the 404 of the website instead of showing the edit page of the application. I have two languages setup for this project and also formBuilder module. Other than that, I don't see any differences with the other working project. The applications overview (/processwire/setup/appapi/applications) does work the way it should. Do you have any idea where this could be going wrong? Update: I removed all modules from the failing project that I had installed (FormBuilder, Language support), but to no avail. I can navigate to /processwire/setup/appapi/applications/ which lists all applications, and /processwire/setup/appapi/application/edit (without an ID and it will give me a missing ID message within the admin). As soon as I add an ID (/processwire/setup/appapi/application/edit/1) it will fail, throws a 404 outside of the admin. I also cleared out my ready.php to prevent any hooks causing issues. @ryan You obviously can't provide support for a custom module, but is there anything here that sounds familiar? Could there be a routing or permission issue here? Is there some caching going on somewhere that might be causing this?
-
Hi, I'm building a picture gallery, consisting of multiple pages. On each page I would like to add tags to my images, which I can do nicely using the predefined image tags I can set up. However, I was wondering if it is somehow possible to fill the predefined image tags with more dynamic values, like for instance a list of pages (using title or a different field of that page, adhering to the rules for tags). This would make it more flexible for me, as I would not have to have multiple different images fields with different sets of predefined tags.
-
Hi all, I have an images field on my template, which can contain multiple images, returning an array. When trying to get either first() or getRandom() image of this array and then applying size(width, height) to it, the image will render properly resized, however in the PW logs I find: Fatal Error: Call to a member function size() on null. I can't understand why. When limiting the field to only 1 image and applying size, no error occurs. Also when looping through my array and applying size to each individual image, no error occurs. Does anyone have any clue as to why the image renders properly, but the log gets filled up with an error? // No errors foreach($page->banner as $image) { $thumb = $image->size(200, 200); echo "<a href='$image->url'>"; echo "<img src='$thumb->url' alt='$image->description' />"; echo "</a>"; } // Error in the logs, however rendering properly $random = $page->banner->getRandom(); $thumb = $random->size(200, 200); echo "<a href='$random->url'>"; echo "<img src='$thumb->url' alt='$random->description' />"; echo "</a>";
-
strange error in admin page "Unrecognized path"
PascalKonings replied to sakkoulas's topic in General Support
Thanks, Sakkoulas and Adrian, I will contact my hosting provider as well to see if he can fix the problem!