Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. $firstItem = $feature->issue->first(); echo "<p class='iss uk-text-tiny bold caps'><a href='$firstItem->url'>$firstItem->title</a></p>";
  2. One tweak that I think is worth making is to use: $e->object->getPage() rather than $this->input->get('id') to get the page being edited. /** * modify headline in page edit interface */ $wire->addHookAfter('ProcessPageEdit::headline', function($e) { $pageBeeingEdited = $e->object->getPage(); if (!$pageBeeingEdited->id) return; $headline = "My ID is $pageBeeingEdited->id"; $this->wire('processHeadline', $headline); // no need to modify the return value ($e->return) });
  3. Just wanted to explain @kixe's excellent answer a little for those who might be wondering why that hook isn't listed in the Tracy Captain Hook panel or on the Captain Hook page: https://processwire.com/api/hooks/captain-hook/ What is going on is that ProcessPageEdit extends Process and Process has a ___headline() hookable method. If you're used the Tracy Captain Hook panel, it always pays to check the class that the current class extends: Now we're looking at the hooks for the Process class and we can see that headline is available. Hope that helps! The other useful tip is the to click the "Toggle All" button at the top and CTRL/CMD +F and look for "headline"
  4. Hi @OllieMackJames - I'm afraid I don't have the time to do this at the moment, but I am sure you can extend the "Copy Repeater Items to Other Page" action to support RepeaterMatrix fields - probably just a matter of another loop. If you make those changes, I'd really appreciate a PR Let me know if you have any questions.
  5. @Jon - just took a look and can't seem to reproduce. What version of the module are you running? Can you please details of the code in the template file, and your auto prepend/append settings please?
  6. @Jon on mobile right now, but just wondering if the chosen template file is actually connected to a PW template. It doesn't need to be and maybe that is the issue but I'll have to check when I'm back at my desk in the morning.
  7. Actually, you probably want $field->addFlag(Field::flagAutojoin); $field->save(); so you don't remove any other existing flags.
  8. Tracy can really help with reporting of image upload errors - usually you'll get warnings/notices in the the errors panel, or you'll get Tracy's "Buescreen" for fatal errors.
  9. Autojoin is a flag, like system, global, etc: $field->flags = Field::flagAutojoin; $field->save();
  10. https://www.websprudel.de/processwire-ein-cms-das-sich-anzuschauen-lohnt/
  11. Here's the info on each() https://processwire.com/blog/posts/processwire-core-updates-2.5.27/#new-each-method-added-to-all-processwire-arrays On a related note, it's also worth reading about these related methods https://processwire.com/talk/topic/5098-new-wirearray-api-additions-on-dev/
  12. Sorry, I have no idea what that means Could you explain a little more, or do a screen recording please. I don't see an issue here on FF on Mac, but maybe there is something with the Linux version?
  13. PS - don't forget ->each("title") when testing page selectors so it's easier to see what pages are matched.
  14. It does look like the initial resize hasn't worked properly - maybe I need to test Firefox. Try dragging the resize handle (between the code and results pane). Also, if you click the Console panel icon (rather than hover) and then click the "large" up arrow at the top right. The large version will be kept unless you revert. Let me know if you have trouble getting that to work.
  15. You don't even need to do that If you have the Request Info panel running, you will see the POST variables automatically populated - depending on your scenario it might be in the main bar, or the "redirect" bar.,
  16. I think that integrity constraint violation definitely needs attention! But back to the issue at hand - have you tried using Tracy in Production mode to log the errors. When she emails, she only sends one until you clear the sent email flag, so your inbox won't be bombarded with repeat errors. Tracy also has Slack and Monolog adapters: https://componette.com/search/tracy available, but I guess it wouldn't be hard to write a Jira one if you prefer that.
  17. I don't think it needs to be automatic, but perhaps the instructions could be expanded. Currently all they say is: "Create your processes then enter a path to the json or php definition of the fields in the path field." and that didn't initially make sense to me. I think spell it out: 1. Create a page under Admin (at the top level or under Setup if you prefer) 2. Save the page and then choose the ProcessSettingsFactory process from the dropdown. 3. Enter the path to youre settings file. Not sure using a placeholder is good the way you did - I actually thought it was already filled out with: settings/site-settings.php I also think you should say included "samples", not examples, because of the folder they are stored in. Hope that helps.
  18. Hey @Macrura, I was surprised that the Process module didn't automatically create its own page, so I was a little lost for a minute or two, but otherwise looks great and looking forward to using it - thanks for the hard work!
  19. For me it's a mix. I really like a GUI for visually reviewing the code changes in all files before committing. But for checking out and pulling updates from other (not my) repos, I use the command line.
  20. Yeah, the "user-admin-all" is very strangely named I think: https://processwire.com/api/user-access/permissions/#user-admin-permissions The description says that it reduces the user's rights to guest users only and then you build up from there with the user-admin-[role] option. All that said, I still think we need a way to let a user with some user-admin permission create another user also with this ability. Otherwise you can't let a client handle the creation of new users in their organization who can also do user management.
  21. I just came across this also. I think that even though this is clearly intentional: https://github.com/processwire/processwire/blob/bafe3d4a1289f6d225c657c4206c27c7a27a5b14/wire/modules/Process/ProcessUser/ProcessUser.module#L211 it is problematic if you want to give a user the ability to create other users with the ability to also create users. I think this should be a Github issue - anyone else have any thoughts? If you need a quick fix, you could comment out the line shown above.
  22. Not sure it's actually an optimization - more of a reduction and maybe a simplification depending on how you look at things. It also might handle template names without any additional logic which can also be nice.
  23. Just a quick note on the $page->template to $itemtemplate conversion. You could replace all that logic with: $itemtemplate = rtrim(str_replace(array('event_', 'special', 'business'), array('single-', 'special-', 'business-'), $page->template), 's'); It's really up to you whether this seems nicer or more complicated
×
×
  • Create New...