-
Posts
40 -
Joined
-
Last visited
About PascalKonings
- Birthday 08/09/1981
Profile Information
-
Gender
Male
-
Location
The Netherlands
Recent Profile Visitors
2,126 profile views
PascalKonings's Achievements
Jr. Member (3/6)
11
Reputation
-
For my site I would like to add a few editors with specific roles, to manage their bits of content and add new pages, but only below a certain part of the tree. Since I have a generic set of templates, I can't limit access or content management by template, because all templates should remain selectable when creating content. What is the preferred way (hooks or other default settings) of restricting access to a certain part of the tree, without doing so based on template family rules?
-
Hi, I've been developing PW websites since 2011, so I'm not a newbie. I just got a new development machine (Mac mini m4) and started reinstalling/transferring my projects. On my MAMP 6.9 installation all moved projects are running just fine, no errors there. However, installing a fresh copy of PW (doesn't seem to matter which version) immediately shows a console error on the first page of installation and therefor preventing me from installing PW altogether. The error is: main.js:843 Uncaught TypeError: Cannot read properties of undefined (reading 'toggleBehavior') at Object.setupInputfields (main.js:843:62) at Object.init (main.js:15:8) at (index):76:25 I'm not sure why this is happening, but I can't seem to find anything on this error either. First I thought, maybe something is off on my new machine, but on my old machine the installer gives me the same error. I've tried downloading from github (zip) and the download link on the website, both are triggering this error. Does anyone have a clue here?
-
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?