Jump to content

elabx

Members
  • Content Count

    774
  • Joined

  • Last visited

  • Days Won

    6

elabx last won the day on August 27

elabx had the most liked content!

Community Reputation

802 Excellent

About elabx

Profile Information

  • Gender
    Male
  • Location
    Mexico City

Recent Profile Visitors

9,053 profile views
  1. It seems you are calling save() a few times on the page you are expecting in the hook? First when creating the page, and later when adding the repeater to the page, and then one last time (which might be unnecessary?)
  2. I'm in this exact same position, UIkit solves A LOT of the "interactivity" requirements coming from clients/agencies.
  3. I didn't risk to try! Couldn't find the time to explore the possibility for that specific project.
  4. Thanks!! I know @Wanze is now a bit disconnected of the ProcessWire world that's why I haven't tagged him but seems like my last hope 🤣
  5. Seems UIKit is returning a Promise? I think this should work?? Got it from here: util.ajax('/data/newsletter/', { responseType: 'json', method: 'POST', data: JSON.stringify({ mail:mail, sms:sms, msg:msg, cmt:cmt, }), }) .then(function(xhr) { console.log(xhr); if(xhr.status !== 200) { UIkit.modal.alert('error xyz'); } }, function(error){ //error goes here });
  6. Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this. Doing this at the end of the controller: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); }
  7. I am using Smarty! For what I understand that shouldn't really matter, but I am not entirely sure.
  8. Hi @gmclelland! I did found the issues you came across, but didn't solve them and also the redirect shouldn't happen before the 404 😞 I read on this github issue that this shouldn't happen anymore in version 2 of the module so I went for updating everything but didn't work either still can't throw the exception on the controller.
  9. Hi! Does anyone know how to handle throwing a Wire404Exception so that PW renders the 404 page as it normally does? Getting: Fatal Error: Uncaught Wire404Exception I am using the Smarty Engine. Both the engine factory and smarty engines are on their latest versions. I am using url segments to change the url structure of the site I'm working on. Doing something like this: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); }
  10. I hope someone could shine some light if something like this is possible (don't know if you tried it?): CustomRepeaterPage extends RepeaterPage { ... } What I do a lot is on site/ready.php $wire->addHookMethod("RepeaterPage:newMethod", function(){ .. })
  11. Not sure if "the most proper" but one way I can think of is creating a module that adds the required methods/properties through hooks and just reuse the same method for both hooks.
  12. Me neither. Or maybe you 're trying to pull data from MongoDB into a site powered with PW?
  13. That would seem to be because your "categories" field is a Page field configured for multiple pages? If that is the case, it's normal that the "categories" property wouldn't have at title property itself, because it outputs as PageArray.
  14. $content = ""; foreach ($pages->plus as $key => $projet) { if ($key % 2) { $content .= "A"; } else { $content .= "B"; } } echo $content; Can you try this?
×
×
  • Create New...