Jump to content

froot

Members
  • Posts

    707
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by froot

  1. Just looking at this line of code I doubt that would accomplish what I had in mind. You're incrementing the id by 1, what I meant is to reset the unnecessary incrementing during testing.
  2. not an easy fix for me. In the action options I can only select the field inside the repeater, not the repeater. Not sure why I would want that, but there's no easy way to get to the field's "parent" repeater. Also, I guess, the issue might be that you need to specify which one of the many repeaters – thus multiple repeater's subfields with the same name – to set the value for.
  3. I figured out what's with the memory exhausted problem. That is solely related to whether or not I do an automatic database backup or not. So I do have a work around, you know, just not do database backups. It might just have to do with the server, I will look into that, but it's not urgent.
  4. I'm trying to use the core admin action Field Set or Search and Replace to set a value of a field inside a repeater field. That doesn't work, I tried with the option "Use Regex" ticked and unticked as well as the option "default" Language ticked and unticked. I guess repeater fields are more complex for this action to get the job right. Any suggestions?
  5. Not sure if that makes a lot of sense or even if it is possible. I happen to find myself iterating the page IDs and other IDs a lot during testing, only to delete the pages and whatnot afterwards. So I'm basically iterating the IDs for no good reason. Wouldn't it be nice to have a module that can reset that ID in the database, either manually or automatically, say upon deletion?
  6. I'm having the same issue as mentioned above Optimize table to reclaim space and reorganize indexes. I don't know what is going on here actually. Is that a reason for concern? Does that have to do with the database configuration? Also, I almost exclusively see this warning next to custom fields that are created for a custom module of mine upon installation. So naturally I wonder if I misconfigured something inside that module? Thanks for help!
  7. How can I add a classic I have read and accepted the privacy policy and terms and conditions-checkbox that needs to be ticked before submitting to the subscribe form in ProMailer?
  8. maybe I made myself not too clear or I'm not getting something very basic. I want to have a link inside the /admin/setup/ dropdown menu that brings me to my modules settings page. My module extends class WireData implements Module, ConfigurableModule, so the settings of the module are defined in an array of different fields in a separate php file outside the module's class. If I click on the module or on "Settings" just where the module is in the modules list, it brings me right where I want to be. I just want this page easier accessible.
  9. how can I add a shortcut to my module or my module's settings page (which is the same in my case, I think) inside /admin/setup/ (dropdown) ?
  10. Thanks for looking into this Bernhard. I'd love to make it more backwards compatible though, so I'm still trying to solve it old-school. Here I'm getting the first field of the template that is an image field, not really relevant but what ever. foreach($item->fields as $field) : if($field->type != 'FieldtypeImage'){continue;} else {$imagefield = $field; break;} endforeach; $imageHttpUrl = $item->$imagefield->first->httpUrl; This seems to always work when the field is set to array or automatic and whether the field is populated with just one or more images. That's good enough for me. However, now I'm wondering, if the field is not populated at all, how I can make it work for the fall-back value that you can set for an image field, you know? The one you specify in the "Details" or "Advanced" tab of the field settings.
  11. OK turns out ->ext is misleading and not the right property to set here. ->extensions works though, what do you know.
  12. OK after some reverse-engineering, for lack of a better word… no actually reverse-engineering actually nails it. I found out that the fieldgroup's name needs to match the template's name. Once this is ensured, it works, then you can edit/remove/add/shuffle fields, all the good stuff. You're welcome ?
  13. this remains a mystery. Also, I found another typo. Should be its and not it's ? EDIT: never mind, the typo got fixed in a later version ? ?
  14. yes that is indeed the case, OK then it's not an issue, I just didn't know that it would do that. I can work around that then or use autoload somehow – thanks!
  15. another issue I'm having now is that the module keeps reinstalling itself when I open the frontend. I uninstall the module, delete all related fields, templates and pages. Clear compiled files, refresh the modules (which is probably pointless), then open any site in the frontend and boom, the module is installed again along with all that I deleted manually. How can that be? It's not autoload or anything. thanks for help
  16. what an old thread… anyways, since PW is backward compatible to the extreme, I wonder why my approach doesn't work if it's so similar, see issue in this thread here… The problem being, that I cannot edit the template's fields afterwards (add/remove/change order of fields), it's not an ASMSelect field and so it's kind of locked. Here's my code to create the template and fieldgroup with if(!$templates->get('kiosk_order')) : $fg = new Fieldgroup(); $fg->name = 'fieldgroup_kiosk_order'; $fg->add($fields->get('title')); // Add title field (mandatory!) $fg->add($fields->get('kiosk_order_id')); $fg->add($fields->get('kiosk_order_products')); $fg->add($fields->get('kiosk_order_customer_name')); $fg->add($fields->get('kiosk_order_customer_emailaddress')); $fg->add($fields->get('kiosk_order_customer_address_billing')); $fg->add($fields->get('kiosk_order_customer_address_shipping')); $fg->add($fields->get('kiosk_order_payment_method')); $fg->add($fields->get('kiosk_order_total_and_shipping')); $fg->save(); $kiosk_order = new Template(); $kiosk_order->name = 'kiosk_order'; // $kiosk_order->title = 'Kiosk Order'; $kiosk_order->label = 'Kiosk Order'; $kiosk_order->fieldgroup = $fg; $kiosk_order->pageLabelField = 'title'; $kiosk_order->parentTemplates = array($kiosk_orders->id); $kiosk_order->noChildren = 1; $kiosk_order->tags = 'kiosk order'; $kiosk_order->icon = 'shopping-bag'; $kiosk_order->save(); endif;
  17. will wait till it's master then I guess, but good to know
  18. hm... doesn't work for me. Here's my code: if(!$fields->get('custom_product_images')) : $custom_product_images = new Field(); $custom_product_images->type = $this->modules->get("FieldtypeImage"); $custom_product_images->title = 'Custom Product Images'; $custom_product_images->name = $this->wire('sanitizer')->pageName($custom_product_images->title, true); $custom_product_images->label = 'Product Images'; $custom_product_images->ext = 'gif jpg jpeg png'; $custom_product_images->tags = 'custom product'; $custom_product_images->set("textformatters", array("TextformatterEntities")); $custom_product_images->save(); endif; I think my field needs to be an "Array of items" at all times, and not "Automatic". How to define that with API?
  19. is that on the dev branch 3.0.204? or master 3.0.200?
  20. I changed the fieldgroup of the template in question, just to see, with a fieldgroup that I know works fine (one that I created via GUI). After saving, it still shows the fields as shown in the screenshot above. So I'm convinced it has to do with the template that I created itself, not the fieldgroup. So I did a print_r of the faulty template and another template that works as expected (again, created with the GUI) and the only things different I see are [data][editroles] = Array ([0] => 1101) [data][createroles] = Array ([0] => 1101) [ns] => ProcessWire which is missing in the faulty template. And that kind of makes sense to me because I cannot edit the fields of this template so it must have to do with permissions/roles. I doubt it's the last one with the namespace (?). But now what, how do I add a role via API? Do I add it with its ID or the name? Wouldn't that change with every installation? Thanks for help.
  21. @ryan any idea? It also says For your reference, this is a list of fields used by this template. This template gets it's fields from the 'fieldgroup_kiosk_order' template. instead of Define the fields that are used by this template. You may also drag and drop fields to the desired order or create a new field. Seems like this is actually a wanted behaviour in some scenario I can't fathom here.
×
×
  • Create New...