Jump to content

Mackski

Members
  • Posts

    140
  • Joined

  • Last visited

Everything posted by Mackski

  1. Off topic, how does PW handle PDO inserts? Cant find any examples, plenty of SELECT statement examples.
  2. How would I then ensure the pages are still linked to the correct template?
  3. Ok, so the fieldgroups_id in templates corresponds to the id in fieldgroups? I can see some templates have a flag column, set to 8 for repeaters.
  4. Hey Adrian, yes the only table deleted was templates. I have everything else. I'm still crying on the inside. I'll give it a shot and see what I can come up with. Anyone looking for some extra work
  5. Don't ask how, but it's happened, my templates tables has been deleted by a third party working on the site. No backup, nada. Is there ANY way to recreate this table using existing / code / schema / data? I feel sick
  6. How does one save multiple values against this field type via the API? ie: POST => [0] => 1, [1] => 3, [2] => 10 Where the value in the array corresponds to the ID of the option. Helps to read the docs sometimes: implode("|",$_POST['blah']);
  7. So I have this weird situation, where I need 2 x pageAutoComplete selectors on a page, and the second is reduced by the first. I've tried a few different combinations without success. Code for selector in second pageAutoComplete: return $pages->find('template=committee_event,committee_draft='.$page->committee_draft->id.',include=all'); Where $page->committee_draft->id is the value of the first pageAutoComplete, and committee_draft is an pageAutoComplete on the template committee_event
  8. I'm having a few issues with wireRenderFile in PW3. In my _init.php i have: // process site notes $data = array('notices',$notices); // $notices is processwire array $partials = wireRenderFile('views/partials/_notices',$data); Doesnt seem to work, I assume this has something todo with the File Compiler?
  9. Same error: Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, role.id=1015) Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, roles.id=1015)
  10. This was my initial thought, considering other pages might need access. I guess the only draw back, is if you have a lots of people, the size of the dropdown or radios etc, might get a bit crazy, not sure what the best solution for display would be in this case.
  11. Probably a pretty common scenario, but thinking long term and scalability what are the pros and cons of the following data structures to achieve the same thing? The only draw back of option 1 is that you cannot see the relationship of data at a glance. I would need to create some custom pages to show all related data to a person. Option 1 - Page links This is taking a more SQL approach, where a page represents a database table with link fields to other pages. People Activities Events - Person Link - Activity Link Option 2 - Nested Structure (preferred?) This option is fine, however, for each person the child tree needs to be created upon first login. Subject to changes this could get messy for existing people entries. People - Activities - Events
  12. Same error: Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, roles.name=rider)
  13. I have a field setup as a Page type. Custom selector to find selectable pages: template=user, roles=rider Users have the specified role, upon saving the page I get an error: Error saving field "rider_account" - Page 1029 is not valid for rider_account (Page 1029 does not match findPagesSelector: template=user, roles=rider) However, If I change the selector to: template=user it works (Although I get a full user list, not just those with role = rider) Strangely this works if I use "Custom PHP code": return $pages->find('template=user, roles=rider'); possible bug?
  14. As I'm giving my client access to the users list, I'd like to persist columns added to the user filtered table here: Admin > Access > Users. Is there currently a simple way to persist these changes for those whom have access to view? I could hack the process behind it, but that's not right. Maybe a save icon next to refresh? (could go into wish list)
  15. Possible UI/UX improvement. Quite often I work with large amounts of fields and templates grouped by various tags. It would be nice to show these tags as the second menu level, and add a third with the actual fields and templates grouped. Perhaps this could be a $config option? The dropdown menu for fields can extended page height which is hard to scan read, and select the appropriate field / template sometimes.
  16. Should $session->message persist? I have code that says otherwise, unless this is a bug? I'm just refreshing current page to show message. if($mail->send()) { $session->notices = false; $session->message('Thank you, your enquiry has been sent, we will be in touch shortly.', true); $session->redirect($page->url); } // render notices $data = array('notices',$notices); $partials['notices'] = $page->render('views/partials/_notices.php',$data); Event when revisiting the page after further navigation, the message remains. Weird. EDIT: Session.php line 117, has remove method commented out: // $this->remove($type); Enabling this solves the problem, just wondering why it would be commented out? After rendering notices on the front end I have to call: $session->removeNotices(); to force removal.
  17. Once installed, I cannot edit the settings PW says "Can't uninstall module - Module is not already installed" that's just plain weird. Not sure if it's a PW bug or module bug.
  18. Thanks Lost, after digging through the code it's quite obvious. Adding this worked: $session->message('Saved', true); Then just check when generating the notice messages: foreach($notices as $notice) { if($notice->flags > 1) continue; // only process front end notices // display notices... }
  19. I'm using $session->message and $session->error for my front end. When using FieldtypeMapMarker module, a message displays after succesfully geocoding an address. (Which I want to suppress from the front end) Is this possible? Better still could the message and error functions allow an aditional boolean to signify a different intended use?: eg: $session->message('Well done!', Notice::frontEnd); // or user defined $session->error('Sorry, Broken!', 'MyMessages');
  20. Strangely enough, upgrading has fixed the issue.
  21. 2.6.1 Yes creating a new template from scratch works. I should have been more clear, try renaming basic-page, to 1-basic-page. This is when the error occurs.
  22. Why cant I name a template like this? 1-section-name I get an error The name "1" is already in use
  23. A real time saver when organising a site with large amounts of fields. I find myself forever clicking new and modified fields, advanced > tag and modify its grouping this way. It would be nice do this with less clicks in a drag and drop format. This way, one could rapidly create a large amount of fields, and simply sort and group within tags later.
×
×
  • Create New...