Noboru Posted November 12, 2016 Share Posted November 12, 2016 @tpr: Installing on an old php-5.3.8-site isn't possible, I'm getting Fehler: Using $this when not in object context (Zeile 427 in /site/modules/AdminOnSteroids/AdminOnSteroids.module) Link to comment Share on other sites More sharing options...
tpr Posted November 12, 2016 Author Share Posted November 12, 2016 Could you show the exact line? In different versions the line could be other than in the latest. Link to comment Share on other sites More sharing options...
Noboru Posted November 12, 2016 Share Posted November 12, 2016 Hi, I think it's in line 427: $modulePage = $this->config->urls->admin . 'module/edit?name=AdminOnSteroids'; AOS-Version is the latest (1.0.3). Link to comment Share on other sites More sharing options...
tpr Posted November 12, 2016 Author Share Posted November 12, 2016 No idea why is that - could you replace "$this->config" to "wire('config')" in that line? Also what is the version of PW? If you can, could you check with a newer PHP? (eg if you can switch PHP version on the server via cPanel or other) 1 Link to comment Share on other sites More sharing options...
Noboru Posted November 12, 2016 Share Posted November 12, 2016 Changing to "wire('config')" was successful. The next "this"-error was on line 430 ( Using $this when not in object context). I changed the output to only "$disabledText" and now AOS is working on PHP 5.3.8 Unfortunately, I can not switch to a newer PHP version on the server because there is still an old application running PHP 5.3.8. Processwire is on latest Dev (3.0.40), but I think the error is because the old PHP. Thanks for your support! 1 Link to comment Share on other sites More sharing options...
bernhard Posted November 13, 2016 Share Posted November 13, 2016 hi tpr, i have an issue with your module in a panel frame. i created a demo process module so you should be able to reproduce it. just install the module, go to the hello world page and click "reply" when i click into the field the first line is moved down and also there is some error on top you can import the needed field here: { "rocktodos_body": { "id": 148, "type": "FieldtypeTextarea", "flags": 0, "name": "rocktodos_body", "label": "Nachricht", "contentType": 1, "htmlOptions": [ 2, 4, 8 ], "icon": "align-justify", "inputfieldClass": "InputfieldCKEditor", "tags": "-RockTools -RockTodos", "collapsed": 0, "required": 1, "minlength": 0, "maxlength": 0, "showCount": 0, "rows": 5, "toolbar": "Format, Styles, -, Bold, Italic, -, RemoveFormat\nNumberedList, BulletedList, -, Blockquote\nPWLink, Unlink, Anchor\nPWImage, Table, HorizontalRule, SpecialChar\nPasteText, PasteFromWord\nScayt, -, Sourcedialog", "inlineMode": 0, "useACF": 1, "usePurifier": 1, "formatTags": "p;h1;h2;h3;h4;h5;h6;pre;address", "extraPlugins": [ "pwimage", "pwlink", "sourcedialog" ], "removePlugins": "image,magicline", "textformatters": "", "showIf": "", "columnWidth": 100, "requiredAttr": "", "requiredIf": "", "toggles": "", "extraAllowedContent": "", "contentsCss": "", "contentsInlineCss": "", "stylesSet": "", "customOptions": "", "plugin_sourcedialog": "" } } ps: seems that it has something todo with the getinputfield method and the id... don't know whats going on ProcessHello.zip Link to comment Share on other sites More sharing options...
tpr Posted November 13, 2016 Author Share Posted November 13, 2016 The edit field link is failing because I use a CSS selector "#ProcessPageEdit .aos_hasTooltip .title", so it is not applied to non-processpageedit type pages. I guess I can remove this limitation. The extra top seems to come from the Sticky CKEditor toolbar setting ON, but I couldn't reproduce. Could you find what CSS rule is causing this? 1 Link to comment Share on other sites More sharing options...
bernhard Posted November 13, 2016 Share Posted November 13, 2016 thank you tpr, makes sense sorry i had to change my code and i am using a modified page edit screen (because i have a files field and need to store files, so it has to be a page). there everything works fine. would be nice to remove the editlink limitation. i'm using lots of my fields in custom forms for a processmodule! thank you Link to comment Share on other sites More sharing options...
Robin S Posted November 14, 2016 Share Posted November 14, 2016 @tpr, I'm not loving the bold styling applied to active/open items in PageList instead of the default yellow background. Can you make this optional please? 1 Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 Just uploaded v104 that adds ctrl+u source mode toggle to CKEditors (CKEaddons keystrokes), plus a new CKEditor plugin Keep TextSelection. The latter works with the non-dialog source mode only (plugin limitation). Also contains bernhard's request to allow field edit links on non-pageedit pages, and a possible fix for the PHP 5.3.8 issue reported by @Noboru which is probably due to the missing support for closures - if so, I'll rewrite all of them in the module. 3 Link to comment Share on other sites More sharing options...
bernhard Posted November 14, 2016 Share Posted November 14, 2016 works, thank you!! 2 Link to comment Share on other sites More sharing options...
Noboru Posted November 14, 2016 Share Posted November 14, 2016 Hi tpr, I can install and use 1.0.4 successful on my PHP-dinosaur ;-) Thanks! 1 Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 Thanks - I guess you may run into issues because of the other closures, I'll refactor soon. Link to comment Share on other sites More sharing options...
adrian Posted November 14, 2016 Share Posted November 14, 2016 Hey @tpr - have you considered adding edit links to the breadcrumb trail so that when you are editing a page, you could easily click on one of its parents in the breadcrumb to edit it? Maybe an edit icon after its title, or maybe longclick (although this is becoming synonymous with modal editing which I don't think we want in this case). Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 Sometimes I feel I write the readme in vain Add long-click and ctrl+click actions to breadcrumbs: if enabled, long-click on a breadcrumb item will open the corresponding front-end page in a new tab/window, and holding the Ctrl key when clicking on them will navigate to their edit screen. I know it's not too user-friendly but it's there and working 1 Link to comment Share on other sites More sharing options...
adrian Posted November 14, 2016 Share Posted November 14, 2016 8 minutes ago, tpr said: Sometimes I feel I write the readme in vain Jeez - make me feel bad why don't you I did think I'd seen something along those lines mentioned, but when I went to try it, it didn't work. I am getting a mix of "popup blocked" by Chrome for the long-click and nothing happening for the CTRL / CMD click. Remember I am on a Mac, so maybe that's the issue? Link to comment Share on other sites More sharing options...
adrian Posted November 14, 2016 Share Posted November 14, 2016 Update - the editing works with CMD+click with the Reno theme, but not the default theme. Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 It works here in both themes - this is the snippet responsible for it (in Hotkeys.js): $('#breadcrumbs').on('click', 'a', function (e) { if ((e.metaKey || e.ctrlKey) && $(this).attr('data-editurl')) { e.preventDefault(); var url = $(this).attr('data-editurl'); window.location = url; } }); Do you see something wrong with it? If you type "ProcessWire.config.AOS_breadcrumbs" to the console and execute, you can see the array of objects for the breadcrumbs, perhaps there's something failing here. Link to comment Share on other sites More sharing options...
Robin S Posted November 14, 2016 Share Posted November 14, 2016 49 minutes ago, tpr said: I know it's not too user-friendly but it's there and working It's not working quite right in Firefox. The data-url and data-editurl attributes are for the neighbouring breadcrumb item. In the screenshot below the Home item has the data- attributes for the "Four" page. 2 Link to comment Share on other sites More sharing options...
adrian Posted November 14, 2016 Share Posted November 14, 2016 Ok, so the problem with the default theme is that the edit links are off by one level, so if you click on the direct parent it doesn't work and if you click on the Home link then you get the child below it. Everything is fine with Reno. I expect the problem is similar to what I experienced when modifying the breadcrumbs with AdminRestrictBranch. Do a quick search for breadcrumb in my commit history: https://github.com/adrianbj/AdminRestrictBranch/commits/master and you'l see some of the things I did to make it work with Reno. Maybe this will help you in the reverse direction to get this working for the default theme. EDIT: Sorry, this is exactly what @Robin S just pointed out! Link to comment Share on other sites More sharing options...
Robin S Posted November 14, 2016 Share Posted November 14, 2016 2 minutes ago, adrian said: Ok, so the problem with the default theme is that the edit links are off by one level, so if you click on the direct parent it doesn't work and if you click on the Home link then you get the child below it. It seems to be browser-specific on PC. In Chrome the attributes are correct but in Firefox they're wrong. Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 Thanks - actually the screenshot helped, you have debug mode on and that adds an extra item there. Replace line 45 in Hotkeys.js with this: $('#breadcrumbs a:not(.pw-panel):not([href="#"])').each(function (i) { @adrian I'm just generating the editurl/url for the current page and add the data-attributes with jQuery, which is not the smartest way I admit. Maybe this thing needs to be revised some day. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 14, 2016 Share Posted November 14, 2016 10 minutes ago, tpr said: Thanks - actually the screenshot helped, you have debug mode on and that adds an extra item there. That raises the question: why aren't the debug and quick-tree icons shown in Chrome PC? An AOS issue or core issue? Edit: they're not visible in IE11 either. Weird. Link to comment Share on other sites More sharing options...
tpr Posted November 14, 2016 Author Share Posted November 14, 2016 Are you logged in with the same user? If you disable AOS it turns out, but here all the icons are showing up (Firefox, Chrome). Link to comment Share on other sites More sharing options...
Macrura Posted November 14, 2016 Share Posted November 14, 2016 Seems aos column break...broke? 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