Soma Posted November 27, 2013 Author Share Posted November 27, 2013 Ah yes the module inits on page edit screens. I don't see any errors. DO you mean the array to string conversion notices martijn tells about? The notices comes from the all the 'roles' arrays. I don't see them anywhere in the helper text (weird that they're bugging me). These are: editRoles, addRoles, createRoles & roles. I changed the line 156 to this prevents the notices. if(is_array($data_value)) $data_value = implode(" ", $data_value);$settings_str .= "<h1>$data_key:</h1> $data_value<br/>"; I'm not seeing theses notices anywhere so wondering what PHP version you see them? For me it just output "Array" where there is a array in $data_value... So that means my previous try to fix doesn't remove the notices? Ah yes there still seems to be settings that are arrays. The editRoles etc are on template field not? The fix you posted is simple but would just show the ids of the roles, and I would like to output title and links as with parent_id or template_id. I will try to catch the roles also, hope that there's isn't much more. And leave a implode in there for those missing in case. Link to comment Share on other sites More sharing options...
adrian Posted November 27, 2013 Share Posted November 27, 2013 Soma, Yep, just getting the array to string notices. I am on php 5.5.4 although I expect 5.4.x would also give these errors. Sorry in a rush at the airport, so can't debug right now. Link to comment Share on other sites More sharing options...
Soma Posted November 27, 2013 Author Share Posted November 27, 2013 Oh and I gladly will accept any PR or help if anyone finds the time to implement those fixes. Currently short on bandwidth. No and I don't have any notices on php 5.3. 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted November 27, 2013 Share Posted November 27, 2013 (edited) Will see tonight if I have the time to debug. I'm not very handy with that git stuff. // start at line 160 if(in_array($data_key, array('editRoles', 'addRoles', 'createRoles', 'roles'))) { $array = $data_value; $data_value = ''; foreach ($array as $id) $data_value .= $this->pages->get((int)$id)->name . ', '; $data_value = rtrim($data_value, ', '); } $settings_str .= "<span>$data_key:</span> $data_value<br/>"; Edited November 27, 2013 by Martijn Geerts 2 Link to comment Share on other sites More sharing options...
adrian Posted December 9, 2013 Share Posted December 9, 2013 Hey Martijn, Thanks for taking the time to help sort this out. I applied your fix and it works for page editing, but there were still notices if editing anything under the Admin page. I have to admit I haven't spent the time to fully understand the module and your fix, but I have added the following to line 97 and it seems to take care of the other notices: if(in_array($data_key, array('required', 'textformatters', 'size', 'maxlength', 'description', 'collapsed', 'required', 'moduleTypes'))) { $array = $data_value; $data_value = ''; if(is_array($array)) foreach ($array as $id) $data_value .= $this->pages->get((int)$id)->name . ', '; $data_value = rtrim($data_value, ', '); } $settings_str .= "<span>$data_key:</span> $data_value<br/>"; Not sure if there are any side effects. 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 9, 2013 Share Posted December 9, 2013 I don't see any notices anymore here localy, maybe I just prevented it 'dirty' and didn't tell Soma anything So what I remember, is that $data_value is a string and sometimes an array. All those roles thingies are arrays, thats the reason I check for in_array. Link to comment Share on other sites More sharing options...
ceberlin Posted January 28, 2014 Share Posted January 28, 2014 Hi, I just wanted to note that the php notice is still there, when using PHP 5.4 (not visible for PHP 5.3) I am using the PHP dev version. Can this have to do with languages? Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 28, 2014 Share Posted January 28, 2014 Can you tell, on what pages/tabs you get those notices. It can be fixed easily. Link to comment Share on other sites More sharing options...
Soma Posted January 28, 2014 Author Share Posted January 28, 2014 Thanks for the reminder. I'll have a closer look again when I get bandwidth. Link to comment Share on other sites More sharing options...
landitus Posted January 31, 2014 Share Posted January 31, 2014 Thanks Soma for this module. It's one of the biggest admin improvements I've seen. This really saves me a lot of time!! Congrats. Btw, it's not showing the field names in the users template, isn't it? even though I've added custom fields. It would be useful there too. Just letting you know! Link to comment Share on other sites More sharing options...
ceberlin Posted February 10, 2014 Share Posted February 10, 2014 Sorry for the late reply, here is an example page: Notice: Array to string conversion in /site/modules/HelperFieldLinks/HelperFieldLinks.module on line 155 Fields on that page used are of type: checkbox, select, range slider (from a module), text area, page, text, pagetitle... Link to comment Share on other sites More sharing options...
alan Posted March 5, 2014 Share Posted March 5, 2014 I am pretty sure on 2.3 I was seeing an error when editing the Home page, I have moved to 2.4 and now the only place I have seen this error is when editing the Admin page: Notice: Array to string conversion in /Users/alan/.../example.ca/live/site/modules/HelperFieldLinks/HelperFieldLinks.module on line 96 Not a problem for me at all, I just hope it was helpful to report it here and I am not missing something silly. Link to comment Share on other sites More sharing options...
peterfoeng Posted July 14, 2014 Share Posted July 14, 2014 I am running the dev 2.4.7, it seems that the field links are not working at all. Can someone else confirm this? Thanks much Link to comment Share on other sites More sharing options...
adrian Posted July 14, 2014 Share Posted July 14, 2014 I just updated an install to 2.4.7 and the field links are still working here. Link to comment Share on other sites More sharing options...
adrian Posted December 13, 2015 Share Posted December 13, 2015 Hey Soma, I still install this module on every site and was thinking that a nice addition would be to convert the "send_templates" pipe separated list of IDs to a comma separated list of template labels/names. Anyway, just a thought for when you're bored Link to comment Share on other sites More sharing options...
lpa Posted December 14, 2015 Share Posted December 14, 2015 (edited) Tried to install this on dev 3.0.2 and got error: Class 'Wiredata' not found (line 21 of /Library/WebServer/Documents/pw/site/modules/HelperFieldLinks/HelperFieldLinks.module). Edit: The problem seems to be: the line has "extends Wiredata" and should have "extends WireData". By the way, could this link be added to the title where on hover the name of the field is now shown, but is not a link to edit it. Or at least the style: .fieldEditLink, .templateEditLink { margin-top: 1em; } could be less that 1em, even without margin-top. Edited December 14, 2015 by lpa Link to comment Share on other sites More sharing options...
tpr Posted February 3, 2016 Share Posted February 3, 2016 Very nice, just what the doctor ordered! Seem to work fine on 3.0.6. Perhaps the UI could be polished more but otherwise it's a huge time saver. 1 Link to comment Share on other sites More sharing options...
gmclelland Posted February 19, 2016 Share Posted February 19, 2016 Works on PW 3.0.8. Link to comment Share on other sites More sharing options...
ottogal Posted June 6, 2016 Share Posted June 6, 2016 For a while now I run into the before-mentioned "Array to string conversion" issue on editing a page: Notice: Array to string conversion in ..../site/assets/cache/FileCompiler/site/modules/HelperFieldLinks/HelperFieldLinks.module on line 166 else if(is_array($data_value)){ $data_value = implode("|",$data_value); } $settings_str .= "<span>$data_key:</span> $data_value<br/>"; It occurred in PW 3.0.18 and now in PW 3.0.20, too. Link to comment Share on other sites More sharing options...
adrian Posted June 9, 2016 Share Posted June 9, 2016 For a while now I run into the before-mentioned "Array to string conversion" issue on editing a page: Yeah, there a several posts about this if you look back through this thread, as well as a Github Issue (https://github.com/somatonic/HelperFieldLinks/issues/6) - sounds like Soma has had trouble reproducing, so maybe one of us needs to help out and put together a PR that fixes them all - anyone keen? Link to comment Share on other sites More sharing options...
lpa Posted January 29, 2018 Share Posted January 29, 2018 I have always liked this module, but now found out that using this together with AdminPageFieldEditLinks-module there is a problem with the links alignments. I don't know which one should be fixed, though. Normal view: Broken view: Link to comment Share on other sites More sharing options...
gmclelland Posted January 29, 2018 Share Posted January 29, 2018 @lpa - You could replace this module with https://github.com/rolandtoth/AdminOnSteroids . See https://github.com/rolandtoth/AdminOnSteroids/wiki/FieldAndTemplateEditLinks 2 Link to comment Share on other sites More sharing options...
Lance O. Posted March 17, 2020 Share Posted March 17, 2020 Love this module, but unfortunately breaks on RepeaterMatrix fields. ? Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted May 24, 2020 Share Posted May 24, 2020 Good day @Soma! Great module! I've been using it forever and can't live without it. When I login to any site without it installed, I feel kind of helpless for a while) My problem is it does not show the link for the RepeaterMatrix fields. Not an error like in the post above, but nothing at all. Could you please check? Created a github issue for this too.Edit: Sorry for incomplete report. The link is there, when all the items are collapsed. But if the "Remember, which repeater items are open?" option is checked, and one of the items is expanded on page load, the link is gone. Link to comment Share on other sites More sharing options...
Richard Jedlička Posted December 18, 2021 Share Posted December 18, 2021 Hi there, you who are using this module might be interested in a new module I created AdminHelperLinks. It has the same purpose but uses different approach. I don't want to steal @Soma's reputation, but he seems inactive in developing the module and I realized while trying to fix the bugs I can do it differently (using JS instead of PHP) and more meeting my needs. 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