Jump to content

elabx

Members
  • Posts

    1,513
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by elabx

  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?
  15. The solutions pointed on those threads seem to point the right way to what you want to do, maybe if you could post some code?
  16. Definitely benefitted from switching to PHPStorm this year haha, typos are less of a trouble! Although I still keep using emacs a lot, so I'm safe 50% of time. This is super nice too!! But can you believe if feels "wrong" writing with functions API??? But since using PHPStorm it is kind of a no brainer to start using the functions API for the autocomplete benefits.
  17. No issue with "tempalte" but if if ever remember how to write "width" I'm sure I'll pokevolve into a 10x engineer haha.
  18. I think ProCache will always bring benefits as it basically turns the website into a static website, routing requests directly to html files. It will always have the bottleneck of the first request after the cache expire, so there's that (unless you do some work around it with cron for example). But as long as you configure your cache to expire correctly after page updates, there shouldn't be much trouble if your site is brochureware.
  19. Does it fail with any string you input? I have sometimes had issues with particular sets of data being submitted blocked by mod_security. I know it's unlikely that it is something you can change due to your hosting, but you describe a very similar situation I was in, so maybe if trying with string of different lengths or different pages.
  20. Same issue here. Found out anything @fliwire? Lol just gotta echo the variable that is passed by reference: $urlStr = '<p>' . $url . '</p>'; $modules->get('TextformatterVideoEmbed')->format($urlStr); echo $urlStr;
  21. This should be possible with some hook work. Please check this: https://processwire.com/store/form-builder/hooks/
  22. I just did that and while I didn't exactly loose data it just didn't work as expected because Repeater Matrix misses the matrix field's actual type data. I'd rather go the way of using a migration script that you can run through CLI or using RockMigrations (this is probably the fastest way, since the API is very good) module and copy/transform data from the repeater field, to the new repeater matrix field.
  23. Hi! Anyone got any news on this issue?? Gettin git on runcloud too. EDIT: Well I did change the render() return on BreadcrumStructuredData.php on SeoMaestro to this: return $this->files->render(dirname(dirname(__DIR__)) . '/templates/structured_data_breadcrumb.php', ['listItems' => $this->getListItems()] ); And now it seems to have stopped throwing that error , now I wish I knew why it's different lol I was completely tripping with this, it's actually only Tracy Debugger the one triggering this issue.
  24. I think the only field that works this way is @kongondo 's Media Manager.
×
×
  • Create New...