Robin S Posted March 3, 2020 Author Share Posted March 3, 2020 1 minute ago, a-ok said: Is there a way to donate to the module’s development or to yourself? Thanks, but not necessary. Pretty much all my modules get created because I have a need for them in work that I get paid to do, and it doesn't cost me anything to make them available for others to use too. 9 Link to comment Share on other sites More sharing options...
a-ok Posted March 4, 2020 Share Posted March 4, 2020 10 hours ago, Robin S said: Thanks, but not necessary. Pretty much all my modules get created because I have a need for them in work that I get paid to do, and it doesn't cost me anything to make them available for others to use too. You are why the internet thrives. Thanks, Robin. 2 Link to comment Share on other sites More sharing options...
jonatan Posted April 22, 2020 Share Posted April 22, 2020 @Robin S Thanks for an awesome module! ? Would it somehow be possible to show thumbnails from an image field from the pages? Equal to the Admin on Steroids PageListThumbs? (Multiple page select, AsmSelect, allow new pages to be created from field) As you can see when the PageLisThumbs is activated it actually already also applies to the AsmSelect "+ Add" pages overview. What I'm interested in knowing is if it could be possible to be able to show these thumbs (from a specified Images-type page field) next to the title in the overview?... Thanks a lot ? Best, Jonatan Link to comment Share on other sites More sharing options...
Robin S Posted April 23, 2020 Author Share Posted April 23, 2020 @jonatan, what you're describing doesn't relate to the Connect Page Fields module - this module doesn't get involved with whatever inputfield you have chosen to select pages with. Maybe take a look at the Inputfield Selectize module - it shows an example with thumbnails in the readme. 1 Link to comment Share on other sites More sharing options...
jonatan Posted April 23, 2020 Share Posted April 23, 2020 @Robin S ah !.. Makes sense! :D Thanks a lot for such a quick reply! Seems perfect. I'll look into it! Tak care :) All the best, Jonatan. 1 Link to comment Share on other sites More sharing options...
Andi Posted April 23, 2020 Share Posted April 23, 2020 Set this up for the first time tonight, works really well over here. Just to save someone else some head-scratching, if you do this: On 9/14/2017 at 12:30 AM, Robin S said: If you already have some Page Reference values in place before you start using the module on those fields then you can get things set up with a one-off API operation: // Get all pages where page_field_a is not empty $pgs = $pages->find("page_field_a.count>0"); ... Consider adding include=all to your selector to also iterate through unpublished and hidden pages when synchronizing your relationships.. // Get all pages where page_field_a is not empty, including hidden and unpublished pages $pgs = $pages->find("page_field_a.count>0, include=all"); ... Great work on the module @Robin S, coming in very handy ? 3 Link to comment Share on other sites More sharing options...
Robin S Posted April 23, 2020 Author Share Posted April 23, 2020 4 minutes ago, Andi said: Consider adding include=all to your selector to also reiterate through unpublished and hidden pages when synchronizing your relationships. Yes, good tip - thanks. Also note that if unpublished pages are to be included then the Page Reference fields in question would need to be configured to allow them, because by default they are not. 2 Link to comment Share on other sites More sharing options...
gornycreative Posted June 29, 2020 Share Posted June 29, 2020 I just wanted to let you know I ran into an unusual error message with PW 161 revolving around selectors. I was getting a strange popup whenever page creation was operating - stating there was an invalid selector : | I uninstalled and then reinstalled the plugin and the problem went away. Not entirely sure why that would happen (I clear compiled files, cache etc) Just thought I would put a note here in case you were able to replicate the issue. I was upgrading from 160 to 161 and I know Ryan was doing a lot of selector work. 1 Link to comment Share on other sites More sharing options...
Robin S Posted July 2, 2020 Author Share Posted July 2, 2020 @gornycreative, thanks for the report. I was able to reproduce that in PW 3.0.161 when the Connect Page Fields module config has been saved with one or more of the field selects left empty. Should be fixed in v0.3.1. 1 1 Link to comment Share on other sites More sharing options...
Robin S Posted October 18, 2020 Author Share Posted October 18, 2020 v0.3.2 released. This version reverts to the hook methods used in v0.2.3 and earlier of this module now that the core circular reference issue was fixed in PW v3.0.166. To upgrade to v0.3.2 you must be running PW v3.0.166 or newer, which is currently only available on the dev branch. 4 Link to comment Share on other sites More sharing options...
mel47 Posted October 29, 2020 Share Posted October 29, 2020 Hi, Thanks for your module. I have a question. Does it have a way to sync already existing relationships? Just saving again the page doesn't seems to work, I have to remove and re-add the value. Thanks! Link to comment Share on other sites More sharing options...
Robin S Posted October 29, 2020 Author Share Posted October 29, 2020 1 hour ago, mel47 said: Does it have a way to sync already existing relationships? You can use the API for this - covered in this post: 1 Link to comment Share on other sites More sharing options...
neonwired Posted August 4, 2021 Share Posted August 4, 2021 When i try to install this is says required version is 3.0.166, the latest processwire version is 3.0.165. Link to comment Share on other sites More sharing options...
bernhard Posted August 4, 2021 Share Posted August 4, 2021 33 minutes ago, neonwired said: the latest processwire version is 3.0.165. That's the latest master ? Latest dev is 3.0.182+ https://github.com/processwire/processwire/commits/dev 1 Link to comment Share on other sites More sharing options...
Robin S Posted August 4, 2021 Author Share Posted August 4, 2021 @neonwired, as explained a couple of posts above yours, you need to be using PW 3.0.166 or newer (currently on the PW dev branch) to install or upgrade to v0.3.2 of Connect Page Fields. If you don't want to use the PW dev version then you can manually download Connect Page Fields v0.3.1 by browsing back in the commit history: https://github.com/Toutouwai/ConnectPageFields/tree/99f5e06b959d100a57ab130fa6e6f57ffea19dc9 After you download make sure you rename the module folder from "ConnectPageFields-99f5e06b959d100a57ab130fa6e6f57ffea19dc9" to "ConnectPageFields" before you copy it to /site/modules/ and install it (see "Installing manually"). Link to comment Share on other sites More sharing options...
neonwired Posted August 17, 2021 Share Posted August 17, 2021 On 8/4/2021 at 5:54 PM, Robin S said: @neonwired, as explained a couple of posts above yours, you need to be using PW 3.0.166 or newer (currently on the PW dev branch) to install or upgrade to v0.3.2 of Connect Page Fields. If you don't want to use the PW dev version then you can manually download Connect Page Fields v0.3.1 by browsing back in the commit history: https://github.com/Toutouwai/ConnectPageFields/tree/99f5e06b959d100a57ab130fa6e6f57ffea19dc9 After you download make sure you rename the module folder from "ConnectPageFields-99f5e06b959d100a57ab130fa6e6f57ffea19dc9" to "ConnectPageFields" before you copy it to /site/modules/ and install it (see "Installing manually"). How come it has that version if it doesn't require it? Link to comment Share on other sites More sharing options...
Robin S Posted August 17, 2021 Author Share Posted August 17, 2021 8 hours ago, neonwired said: How come it has that version if it doesn't require it? I don't understand the question. ConnectPageFields <= v0.3.1 requires PW >= v3.0.0 ConnectPageFields >= v0.3.2 requires PW >= 3.0.166 Link to comment Share on other sites More sharing options...
taotoo Posted November 20, 2021 Share Posted November 20, 2021 On 3/4/2020 at 5:53 AM, Robin S said: v0.3.0 released. Notable changes in this version: 1. Fix for page clone issue reported by @a-ok in the post above. Thank you for the great module! Should it still be updating connected fields correctly when duplicating a page with the ProcessPageClone module? I'm on 3.0.186 dev and can't get it to update when cloning a page. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2021 Author Share Posted November 20, 2021 1 hour ago, taotoo said: Should it still be updating connected fields correctly when duplicating a page with the ProcessPageClone module? I'm on 3.0.186 dev and can't get it to update when cloning a page. I think I've found a fix for this. Please update to v0.3.3 and let me know if that version resolves the issue for you. 1 1 Link to comment Share on other sites More sharing options...
taotoo Posted November 20, 2021 Share Posted November 20, 2021 3 hours ago, Robin S said: I think I've found a fix for this. Please update to v0.3.3 and let me know if that version resolves the issue for you. That works perfectly, thanks so much for fixing it, and so quickly too! 1 Link to comment Share on other sites More sharing options...
ceberlin Posted November 21, 2021 Share Posted November 21, 2021 Thanks again for providing this module and keeping it up-to-date. This module is so useful for me. 1 Link to comment Share on other sites More sharing options...
MarkE Posted December 11, 2021 Share Posted December 11, 2021 This is a real go-to module - I have used on almost every site! Today maybe I was trying to be a bit too clever and have one of the fields locked (visibility: Open when populated + Closed when blank + Locked (not editable)). I just want the back-link to be viewable, not editable. However, this threw up a fatal error: Too few arguments to function ProcessWire\RepeaterPageArray::__construct(), 0 passed in M:\laragon\www\Cider\wire\core\WireData.php on line 438 and exactly 2 expected search► Is there any way of doing this? I guess I can restrict access for certain user types - is that the only way? Link to comment Share on other sites More sharing options...
Robin S Posted December 11, 2021 Author Share Posted December 11, 2021 25 minutes ago, MarkE said: I just want the back-link to be viewable, not editable. However, this threw up a fatal error I'm not clear on how this relates to the Connect Page Fields module. Could you explain a bit more about how the module is involved in the error? Link to comment Share on other sites More sharing options...
MarkE Posted December 11, 2021 Share Posted December 11, 2021 (edited) 11 hours ago, Robin S said: Could you explain a bit more about how the module is involved in the error? Sorry @Robin S- it was late at night and the error only happened after I installed ConnectPageFields. On closer inspection this morning, it seems that the error might have been caused by something else. Will report back. EDIT: The problem seems to be with Repeaters, not ConnectPageFields. Not pursued this further as my solution was to use hidden visibility (which does not cause errors) together with another excellent little module: FieldtypeRuntimeOnly to display the hidden field in a non-editable way, with the link back ? Edited December 11, 2021 by MarkE Update Link to comment Share on other sites More sharing options...
MarkE Posted March 15, 2022 Share Posted March 15, 2022 I seem to have encountered another problem with repeaters. I am creating repeater matrix items in the API. Different types of such items have different fields which are linked using ConnectPageFields to fields other templates. On creating some matrix types, I am encountering the error "Call to a member function find() on null" for line 132 of ConnectPageFields (v0.3.3), which is $added = $new_value->find("id!=$old_value"); This error seems to be triggered by $new_value being null. $new_value is set on line 127 as $new_value = $page->getUnformatted($this_fname); With a bit of debugging, it is clear that the module is trying to establish a link for a $this_fname which does not exist for the particular matrix type being added in the API. I think I have resolved this by saving the new matrix item before setting its type (so that all fields are present) and then saving again after setting its type. However, I wonder if it would be better to fix it by a module update. I think that changing line 130 to if($this_is_multi && $new_value && $old_value) { has the desired effect, but have not completely tested it. Thoughts? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now