Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates     

  1. Past hour
  2. Hi, Could someone please show me how to create a new field using the API and enable tags as well? It used to work a while back but I am not sure what changed. It seems I can only enable tags using the GUI and only once the field has been added to a template. In addition, it seems one has to do it twice; First enable tag, then disable them then re-enable them! I am talking about normal tags (user enters tags by text input). <?php namespace ProcessWire; $f = new Field(); // ... more code here $f->useTags = 1;// does not work, even if I do this after adding this field to a template $f->save(); Relevant method in FieldtypeFile.module: updateDatabaseSchema() Thanks.
  3. Try curly braces around the $item->images->first()->url. Actually I don't think this won't really solve the encoding issue haha. 🤔
  4. I am very interested in learning Tailwindcss, but I have no experience with the latest tools. How can I integrate Tailwindcss into my processwire projects and use postcss and purgecss to remove unused css.
  5. Today
  6. I have local and production config files, so that's exactly the setting I need, thanks!
  7. Hi @Sebi I added the log to app-api (will create a PR somepoint soon), I wondered if you wanted a log message on each request and maybe a setting in the modules settings to turn on or off, or maybe something more granular? My use case is going to require lots of log messages in the api files but having a generic log message on each request I though might be nice. Also wondered if it was worth making a second log for failed (exception) based log messages? so successful requests get logged to one and exceptions to the other..... any thoughts would be cool
  8. 👍 https://google-webfonts-helper.herokuapp.com/fonts
  9. textformatters=TextformatterEntities in my field settings cause problems when moving data around (exporting, importing). I can't get rid of the entities in my code and so I have troubles filtering and selecting the content (I tried $sanitizer->unentities, actually need to apply that twice for it to look good but still does not filter/select properly). I figured It must be possible to change the format in the field directly and once and for all. What other options does "textformatters" allow? Because deleting it altogether doesn't work at all. thanks
  10. Thanks @netcarver. I could not figure out how to use that ProcessForgotPasswords module. There were no instructions anywhere. It looks like it depends on other modules or assumes your login/register process is structured a certain way. Thanks for the other suggestions. Replacing md5() was going to be next.
  11. I'm struggling on this hook that would populate selectable pages in PageTable Edit modal form also when a new page is just created. $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { $page = $event->arguments('page'); // this is a PageTable page i.e. it's created through an InputfieldPageTable field $form = $event->object; if($form->hasField != 'selectable_page_field') return; bd($page); // e.g. output: Page('id' => 123, ...) $related_page = wire('pages')->get("template=tmpl-name, page_table_field.id={$page->id}"); bd($related_page); // output (when $page is just created/added): // => NullPage('id' => 0, ...) // output (when $page is reloaded e.g. the edit page form is refreshed): // => Page('id' => 456, ...) // // Note: get() behaves differently depending on the page process flow: add and edit! // The problem may be caused by the page_table_field (InputfieldPageTable field) which // doesn't create the page until e.g. the related modal window is closed and re-opened, // and/or save button is hit in it. //... }); As expected, the above hook runs every time the Page Edit form using selectable_page_field is rendered. However it doesn't get the $related_page during the creation time because get() returns NullPage(), but the same code does get $related_page in all cases other than the creation time e.g. in Page Edit view after refreshing or closing-opening the modal window. Is there a way to make the get() to work even during page creation?
  12. Thanks — this is now fixed as well 🙂
  13. Exactly that; when visiting the admin page, which should show the updates. Not sure where this one is coming from.
  14. Yes, that was what I was after, thanks. 👍 I had been looking at getMenuItems before, but for whatever reason, it wasn't sinking in.
  15. I'm having and always have a hard time building PaginatedArrays, I never know where to put the "limit=24" selector so please enlighten me. Here's what I'm doing… $categories = $page->protable('start=0, limit=999999'); // this I need in order to retrieve the pages's "categories" and I don't know how to make use of $rows instead for that purpose because of this confusing limit-API $rows = $page->protable; // put ("limit=20") here? $custom = buildSelector($input, $rows); // this function returns an array of selectors depending on the user input $items = new PaginatedArray; // or here? // or here? $items->find("limit=20") // or like this? $items("limit=20") // or like this? $items = $items("limit=20") // or like this? $items = $items->find("limit=20") foreach ($rows as $r) : if ($custom->get('selector')->matches($r)) : $items->add($r); endif; endforeach; // or at this point? and then if ($items) { // or maybe somewhere here? echo '<span class="grey">'.$items->getPaginationString(array( 'label' => 'entries', 'zeroLabel' => '0 entries', // 3.0.127+ only 'usePageNum' => false, 'count' => count($items), 'start' => $items->getStart(), 'limit' => count($items), 'total' => $items->getTotal() )); and then of course… $pager = $modules->get("MarkupPagerNav"); echo '<div class="uk-flex uk-flex-center">'.$pager->render($items, $options).'</div>'; I'm out of ideas and confused cause it doesn't make sense to me either way. ____ The buildSelector function above returns and array… $selected = new Selectors("$letter, $searchterm, $category"); $custom = new Wirearray; $custom->set('selector', $selected); $built->set('sort', $sort); return $custom; and each of the new selectors are basically strings ("category=whatever") Also, you cannot put the "sort=title" or whatever as a selector for the Selectors function (see above). Why, I know not. I don't know if that is the proper way but selecting kind of works now as opposed to many other ways I tried. Selectors always require a lot of trial and error, it seems to have a very sensitive API, always depends on double quotes, single quotes and how you concatenate. Thanks for help!
  16. Yesterday
  17. @ryan - I am noticing that if I click the Update button, it updates the version number (and other info from Github), but it doesn't change the "Updated" date which I think it pretty important. Thanks for taking a look. Also, any chance of changing the dates from yyyy/mm/dd to yyyy-mm-dd so it's a little cleaner / more standard. I think as devs we are more used to the dashes when looking at this order of y, m, and d. I think it makes it clearer which is the month vs the day.
  18. @kongondo I would really appreciate if you could answer the following questions: Will it have pre-order feature for physical and digital products? Will the whole process of ordering (add to cart, edit cart, checkout, PayPal payment etc.) ajaxified?
  19. Congratulations... This looks fantastic. I've run a lot of stores and I feel like you really captured a lot of must-have features that are often neglected elsewhere.
  20. 1) Works for me also and I haven't made any changes for over a month. 2) I agree that an explicit classname section would be a nice improvement. 3) Also no problem here - it redirects as expected.
  21. I haven't used the DataSet XML import for a while. Let me know if it needs some polishing.
  22. Thanks for reporting this. Probably a core compatibility issue. Fixed now. Pull the updated module from github or delete from your site/modules and reinstall it.
  23. Version 1.4.0 released: improves translation tools compatibility.
  24. Glad that this is still useful for you. In the meantime there have been quite a few posts about this topic and there is a great module out there that can assist in building REST APIs with ProcessWire: https://processwire.com/modules/rest-api/
  25. psy

    Get ready to party!

    Client happy with Happy Monkey 😉
  26. mel47

    Hanna Code

    Hi, I know this module have not changed since many years, but could I suggest to add a description for each Hanna code? I come back to my setup page and have some codes that I didn't update since years and I don't know why/where they used through my website. I would like to have written a small description. Yes, you could tell me I should have written comments in the code itself, and it's what I would do starting from now... 🙄 But something on the setup page will be faster to read. Thanks!
  27. Last week
  28. I don't have time to dig into this further today, but wanted to let everyone know that with PHP8 I am having some fatal errors. It was kinda OK until I tried to turn on JIT (based on https://stitcher.io/blog/php-8-jit-setup), but after that, the admin wouldn't load - sometimes Tracy would manage to tell me that it was a CSRF exception. I tried disabling JIT, but that wasn't enough. In the end, I had to disable opcache - in my case, that required commenting out the line: zend_extension=/usr/local/opt/php/lib/php/20200930/opcache.so in my /usr/local/etc/php/8.0/conf.d/ext-opcache.ini file. Note that this on my Mac with LAMP stack installed via homebrew. The browser console was showing the following error: ERR_INCOMPLETE_CHUNKED_ENCODING which others have reported a connection to opcache: https://stackoverflow.com/questions/29894154/chrome-neterr-incomplete-chunked-encoding-error Need to read and learn more, but would also appreciate it if someone else has any insights.
  29. Thank you! Could not test it yet. But wow, what a fast response. 👍
  1. Load more activity
  • Create New...