Jump to content

kongondo

PW-Moderators
  • Posts

    7,473
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. I don't think this is right. My runtime Fieldtype is based off Ryan's Concatenate Fieldtype and that does not create a DB table. See also his comments in the code, e.g. this one. No database table is necessary.
  2. Been getting a similar error on a custom runtime module. Only way around it is to specify a field/fields to fetch as in your example.
  3. Just a comment on the code (not the necessity or rationale of it): A find in any context will always return a collection. In this case, a RepeaterPageArray. You cannot directly apply an action such as status to a whole collection. Although your code might have returned a result whose count is 1 (your 1043 item), it is still a collection. I.e., your 1043-item is in the collection RepeaterPageArray. So, your choices are: use get(1043), in order NOT to return a collection (e.g. RepeaterPage) or grab the first item in the collection, i.e. find(1043)->first(). Ideally, you should be checking that your get() returned something before apply an action to it. Otherwise, you might end up with a 'call to member function addStatus on null' error.
  4. Ladies and gentlemen. You have been waiting for a very long time. I am happy to say we are almost there. I am fixing a few loose ends in readiness for the launch. I will create a new thread outlining the way forward with alpha (early beta) testing later this week (barring any show stoppers) or next week at the latest. Thanks.
  5. I have no idea ?. I have never used Form Builder. Does Form Builder work with custom fields? Honestly, I don't know how it works.
  6. Only if the keys are strings ?...which they probably are in this case.
  7. I get you. Commit's don't always increment the version though ?. When Ryan bumps the version he'll clearly state that in the commit.
  8. The feature was committed some 20 hours ago. Maybe you downloaded your version earlier than that?
  9. https://github.com/processwire/processwire/tree/dev Welcome, @vangeesonto ProcessWire and the forums ?.
  10. <ot> A few months ago, a Google search for htmx "whatever" would invariably throw up 'Did you mean: html "whatever"?'. Those have since reduced. Even the Google AI is getting better acquainted with this new technology ?. </ot>
  11. Glad you've at least isolated the cause of the problem. If you find a solution, please let me know if there's anything I need to do on MM side. Thanks.
  12. Hi @csaggo.com, Many thanks for the purchase. Not a great start for MM! ?. I'll have a look but very much likely something to do with your environment or the install went bonkers. This hasn't been reported recently. I'll test and get back to you. Before, that, please give me more information about your environment, i.e. 3rd-party modules and multilingual or not thanks. Currently this is not available as you've noted. However, you can save filter profiles. Please see the docs here, in case you missed it. Thanks.
  13. After finishing the install, do you have these files? /site/assets/active.php /site/assets/installed.php install.php Have you raised a ticket with ibrave.io?
  14. Hi @lele_ballack, I've merged your thread to Blog's support forum. This bug has been reported in the issue tracker. I just never got time to investigate it. I'll find some time this week to fix this. Sorry for the inconvenience everyone. Thanks.
  15. I have been experiencing this issue for a while: Built-in PHP functions marked as undefined when using the extension PHP Intelephense. It has been driving me nuts! Solution, anyone please? Thanks. Edit: OK, resetting Intelephense: Stubs seems to have solved it. Problem now is that I cannot use my custom ProcessWire stubs. Anyone knows how to use both Intelephense's stubs and custom ones? Thanks.
  16. Visual Studio Code for the Web Visual Studio Code for the Web provides a free, zero-install Microsoft Visual Studio Code experience running entirely in your browser, allowing you to quickly and safely browse source code repositories and make lightweight code changes. To get started, go to https://vscode.dev in your browser. Hmm. Not sure about this one... Thoughts, anyone?
  17. Hi @ctech, Sorry for the very late response. Maybe something like below to get you started? I have deliberately left in debug code so you see what's going on. I am also using findRaw() for efficiency. You can go a bit crazy with limit if using findRaw() ?. <?php namespace ProcessWire; // we only need this one field $fields = ['blog_date']; // get some posts, sorted by date, ascending $posts = $pages->findRaw("template=blog-post, sort=-blog_date, limit=25", $fields); bd($posts, '$posts at line #' . __LINE__); $posts2 = []; // if we got results, format and use them if (!empty($posts)) { // make it clean (not strictly necessary) $posts2 = array_column($posts, 'blog_date'); bd($posts2, '$posts2 at line #' . __LINE__); $monthArchives = []; foreach ($posts2 as $dateString) { // get the month portion of 'blog_date' $month = $datetime->date('F', $dateString); // get year portion of 'blog_date' $year = $datetime->date('Y', $dateString); bd($month, '$month at line #' . __LINE__); bd($year, '$year at line #' . __LINE__); $monthArchives[$month][$year] = $year; // @TODO: DON'T KNOW WHAT YOU WANT THE VALUE TO BE HERE } bd($monthArchives, '$monthArchives at line #' . __LINE__); } // do something with $posts2 if (!empty($posts2)) { // code } Hope this helps ?.
  18. Hi @Orodreth, I merged your thread here thinking that this had to do with the Blog module. Now that I look at it closely, it looks like it is a problem with SchedulePages. I have never seen this error before but I have also not touched the module in a long time. Maybe something changed in ProcessWire since. Are you able to do do some tests so we can try to get to the bottom of this? E.g.: Install SchedulePages without the blog module. Do you get errors? Install SchedulePages in an earlier version of ProcessWire, maybe 3.0.16x. Do you find issues? I am afraid I am currently short of time so cannot investigate further until the net we cast is a little bit narrower, hence above suggested investigations. Thanks.
  19. That is the default behaviour. Alternatively, you can use the method $modules->getModule() with noInstall option. <?php namespace ProcessWire; $modules->getModule('MyModule', ['noInstall' => true]);
  20. Hi Ross. ProcessWire has zero-influence on how your frontend looks like or what strategy you adopt to present your frontend. This is 100% up to you. It is the result of the code you have in your template files. So, what you inherited was the previous developer's strategy for outputting frontend content. In short, ProcessWire does not get in your way. In contrast, it does offer you the tools (via its API) to do various things including fetching data from the backend to show on the frontend. In this respect, it does not matter if your ProcessWire version is 2.3.1. However, there have been numerous improvements to ProcessWire since 2.3.1, too numerous to list here, that make it compelling to upgrade to version 3.x. How to upgrade from a version that far back is a topic on its own but there are threads in the forums (and maybe something in the docs but I am not 100% sure) to help you out. Let me quickly point out that It is not required to upgrade. ProcessWire 2.3.1 is perfectly safe to use. As for responsiveness, that is up to you and your CSS. How are your skills in this area?
  21. Usually we sanitize at the earliest opportunity available. It is also good practice in case you forget or move things around. So, this is better and less verbose: <?php $url_exhibition = $sanitizer->name($input->get->text('exhibition')); ?> As for which sanitizer method to use, the docs are helpful, but you are probably aware of it already. Just nitpicking now... You could probably check if $url_exhibition is NOT empty before continuing with the subsequent code, i.e. the pages->get and the rest of the code ?.
×
×
  • Create New...