Jump to content

jrtderonde

Members
  • Content Count

    35
  • Joined

  • Last visited

Community Reputation

6 Neutral

About jrtderonde

  • Rank
    Jr. Member
  • Birthday 01/04/1992

Contact Methods

  • Website URL
    http://www.jimderonde.nl

Profile Information

  • Gender
    Male
  • Location
    Venlo, Netherlands
  • Interests
    Gaming, Coding, Sports, Music & Beer.

Recent Profile Visitors

1,034 profile views
  1. Sorry for my late response but thanks for all your messages. I'll look into the possibilities to develop this myself. If there's anything new from my side, I will keep you guys posted.
  2. Hey, I recently started working at a new agency where I'll be developing mostly back-end projects. One of my colleagues has introduced me to GraphQL. We're currently using Wordpress in combination with ACF but as I was google-ing I stumbled upon a post in which I saw a GraphQL module for PW, awesome! I think the agency wants to start moving towards a workflow in which we will use a CMS "headless". We build up pages using flexible content (or "Repeater Matrix") and I was wondering if anyone has any experience in using the pro matrix in combination with either graphql or rest api. Ultimately we would be looking to implement GraphQL as it's so fast and dynamic. Looking forward to hearing from your experiences 🙂
  3. Thanks! I'll try it in a bit
  4. Ok, but that's why I'm trying to prevent with the hash as $page->name. I'm using the ID of the customer combined with a timestamp to generate a md5 hash that's "unique". (See the code, I'm pretty sure it should work). Also, the next entry in the array has a complete different customer id. So it should be "impossible" to be duplicated. I'm using this code within a pageSaveHook (module). Could this be a problem? Furthermore, the array counts 11000+ entries, could it be that this is a problem? The platform is hosted on a stable and fast VPS and I cranked up the PHP execution time to 10 minutes, so it shouldn't cause any serious trouble.
  5. Hey, I'm working around a module that adds pages in my ProcessWire installation. The pages are added based on a JSON array that will be imported through a page save. Everything works fine except for when the pages are added. I get the following error Integrity constraint violation: 1062 Duplicate entry '3e215ecd6774fd99c2b0eb5cadf36a07-1269' for key 'name_parent_id' I'm using the following code/loop to generate the pages. // Loop through the files foreach ($p->importFile as $file) { // Set the file location $name = $file->data["basename"]; $path = $p->importFile->path; $location = $path . $name; // Get the file $json = file_get_contents($location); $json = json_decode($json); // Loop through the rows of the import foreach ($json->ttEntityDelAddrLink as $client) { // Create new page $new = new Page(); // Create unique hash $unique = md5(date("Y-m-d H:i:s") . "-" . $client->CustomerCode); // Set some variables for the new page $new->setOutputFormatting(false); $new->template = "_client"; $new->parent = $p; // Create hash $new->title = $client->DelAddressName; $new->name = $unique; // Page specific fields $new->company = $client->DelAddressName; $new->companyId = $client->CustomerCode; $new->city = $client->DelAddressCity; $new->address = $client->DelAddressStreet; $new->postcode = $client->DelAddressZipCode; $new->country = $countries[$client->DelAddressCountryCode]; // Save the page $new->save(); } // Exit for debugging exit; } Does anybody know what's wrong?
  6. I looked at this example and tested if it still included the unpublished pages, unfortunately it did.
  7. But does this answer the question why "unpublished pages are still shown"? I'm uncertain
  8. $streams = $page->child("template=_streams")->children("template=_stream"); This is the chain that I use to get the pages.
  9. Hey, I completely built this platform with ProcessWire (http://djmag.live/). It works fine except for the fact that some pages are still show, even when I change their state to "unpublished". They are still showing when they are returned through $object->children("template=_foo") or $pages->find("template=_foo"). Does anybody know what the problem might be?
  10. Hey, I made a hook that is triggered when a page with a certain template is saved. I meant to create the script only for the backend of the website. Now, whenever a page is saved on the front end (with the API) the module is being triggered. I was wondering if there is a method to have it only trigger whenever a page is saved on the backend (so not through the API). Jim
  11. Hey, I was wondering if there's a way to add more fields to specify when creating a new page. At the moment, the only two fields are required for creating a new page. Title Name (Automated) I've configured processwire so that the chosen page to create is limited to one template. Guess this would make the process to achieve the above a bit easier. Regards,
  12. Thank you for the response Horst. I looked into the documentation, yet I didn't find anything concerning sharpening of images. That's why I came here to ask. I will mask this as solved. But could you please be so kind to link me the page in which the sharpening topic is covered? Thank you in advance. Regards, Jim
×
×
  • Create New...