Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. In your /site/config.php set: $config->debug = true;
  2. Do you have debug mode on so PHP errors will show on the page?
  3. Seems related: OT: don't forget about Tracy's Module Disabler panel.
  4. It should be used on the title field, but not the name field. Just go to the title field settings an change the type to "PageTitle".
  5. The service seems to be dead. Their site isn't loading. I actually removed the module from the modules directory last week when I noticed this.
  6. And if you want an optimized monochrome version (without the gradient on the inner part of the P), go to https://simpleicons.org/ Maybe this version should also be added to that main repo as well?
  7. Of course - just choose a different user and click "Switch". Don't forget to set a session length before initially clicking Logout though so that the User Switcher is activated in the first place. Sorry if it's not totally intuitive - I haven't had much feedback on this feature yet.
  8. I was trying to be extra cautious just in case someone could spoof DETECT mode, although I don't really think that is an issue - I will revisit this sometime soon, because it would be nice if this was always available. Use the "Logout" button - that will log you out so you are a "guest", but still keep the Tracy debug bar available and keep the User Switcher session alive. Feel free to post any suggestions for improvements as you play around with this.
  9. Hi @Ivan Gretsky - you need to manually set the output mode to "DEVELOPMENT" to make the User Switcher work. I initially set it up this way as an additional security layer, but I am thinking about revising the need to do this. Let me know if you still have any problems.
  10. @palacios000 - you need the "filename" rather than "url" of the attachment. Also if the files field allows more than one, make sure to do first() etc as well.
  11. Hey @tpr - as I mentioned here: https://github.com/ryancramerdesign/AdminThemeUikit/issues/20, the icons only PageList option doesn't work in the UiKit theme sidebar. Now maybe Ryan will add this option to the core, but if not, it would be good to get fixed in AoS. Also, the full width hover links don't work. And also wondering if you can make an icon for the template link in the PageList - this would also help with allowing the width of the sidebar to be narrower. I understand that the UiKit theme is still a moving target, so just ideas for you at the moment
  12. You might also try conditional hooks: https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-conditional-hooks
  13. It's probably the valid extensions and missing max files settings - take a look at the Details tab of an image field. I would set those and maybe also the formatted value setting.
  14. The page object is not available in init(). You need to use ready()
  15. Try seats.name=5 and year.name=2008 With page reference fields you are supposed to specify the subfield from the page that has been selected. I never actually realized that some work without specifying the subfield, but I just tested an can confirm what you are seeing. Not sure if this is really a bug or not, but I would definitely recommend always specifying the subfield (either name, title, or any other field from the selected page).
  16. Hey @kongondo - note the Page within each Matrix item. Each one of these contains a full reference to the current page. This comes from dumping $page->matrix_field Here is the dump of $rows and $columns from the export function. You can see that each row is a full PW page object. Is this expected?
  17. This should work: wire()->addHookBefore("ProcessLogin::executeLogout", null, "setRedirect"); function setRedirect(HookEvent $event) { $event->object->setLogoutURL(wire('pages')->get('/')->httpUrl); }
  18. In repeaters: and if you need it for PageTable, @Robin created this: http://modules.processwire.com/modules/limit-page-table/
  19. Some more thoughts on this - I wonder if maybe it's just best to turn on output formatting - that should handle getting the language for the current user. On an unrelated note, I noticed that each entry in the matrix is a full PageArray - is this necessary? I haven't looked into/thought through this, but it seems like a lot of info to have in memory when all we need is a single value with its relevant row and column page ids. Maybe the full PageArray is needed, or maybe it doesn't matter - just thought I'd ask
  20. That's an entry from the "caches" DB table so you can either empty that table, or ignore if the error didn't prevent the other tables from importing.
  21. Ok, I figured it out and have a quick fix in place. It was a multi-language issue. This is my quick fix - to get the default row and column titles, rather than returning a title object. //prepare export values foreach($rows as $row) { $rowTitle = $row->title->getLanguageValue("default"); //only export selected rows if(!in_array($row->id, $rowsChecked)) continue; foreach($columns as $column) { $columnTitle = $column->title->getLanguageValue("default"); //get each matrix value at given coordinates (WireArray) $v = $values->get("rowLabel=$rowTitle, columnLabel=$columnTitle"); $value = $v ? $v->value : '';//force blank values export $exportMatrix[$row->id][$this->_('Row Label')] = $rowTitle; $exportMatrix[$row->id][$columnTitle] = $value; } } Not sure if you want to implement just like this, or whether you think it's worth adding a more complete ML solution. PS - what about changing "Row Label" to the title of the parent page of the first column. In my case I have a page branch of Years to control this column. It would be much nicer if this read "Years" or "Year". Would that work, or are there more things to consider?
  22. Hey @kongondo - I just went to export for the first time and noticed that all I get is the first column entitled "Row Label". Is there something I am missing, or is this a bug? I need this pretty urgently (actually immediately), so I am going to take a look and see what I can figure out, but in case you happy to be online and have an idea for a solution, or something I am missing, that would be great
  23. It should work if you do this: $buildings = $pages->find("template=building-entry"); $allTowns = $buildings->explode('addressBuildingTown'); $uniqueSortedTowns = sort(array_unique($allTowns)); IIRC this notice is new to PHP 7. Google it and you will get some explanations as to what's going on. EDIT: Oops - not sure when you made your edit to show what works, but somehow I didn't see it
  24. Thanks for the explanation and for the "Grant Field Access" config option. I definitely see your logic behind treating access the other way around. I guess I was just considering the situation where you have a regular web site where you want to be able to use the PW API as well as GraphQL. In this situation I would have no problem with all fields being accessible, so great that option is available!
  25. Fantastic video @Nurguly Ashyrov - really well put together and great English - I don't know how you come across so clearly given that you haven't spoken it in 6 years! I am really excited to start using this module. The one thing I noticed which seemed a little weird to me was that by default the skyscraper-editor (or guest) user didn't have access to fields until you enabled field level access control and explicitly gave them view access (~35:10 min mark in video). By default in ProcessWire, anyone can view a field if field level access control is turned off. Only once it is turned on are any restrictions applied. Does that make sense, or did I misinterpret something? Thanks again - this is going to be so very useful!
×
×
  • Create New...