adrian Posted July 22, 2013 Share Posted July 22, 2013 Hey Nico, You have a couple of instances of $config that need to be changed to wire('config') Thanks! Link to comment Share on other sites More sharing options...
Nico Knoll Posted July 24, 2013 Author Share Posted July 24, 2013 Updated it - thanks for mention! 1 Link to comment Share on other sites More sharing options...
onjegolders Posted September 5, 2013 Share Posted September 5, 2013 Hi Nico, Would it be possible to make it so that when pages are in trash, clicking delete permanently deletes the page rather than "re-trashing" it? Either that or perhaps not show the link when a page is in the trash? Thanks! 3 Link to comment Share on other sites More sharing options...
Radek Posted February 13, 2014 Share Posted February 13, 2014 Hi Nico, can you make translatable more strings like: Moved page to trash You don't have access to delete that page This module requires ProcessWire 2.1 or newer.. And maybe dont read "delete" translation from /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module as i want be able to translate it separately. One more vote for fixing delete behaviour in trash with pernament page delete or hiding delete button. Thanks Link to comment Share on other sites More sharing options...
Nico Knoll Posted February 13, 2014 Author Share Posted February 13, 2014 Tried fixing everything. Have a look and please tell me if it's working: https://github.com/NicoKnoll/ProcessPageDelete 1 Link to comment Share on other sites More sharing options...
adrian Posted February 13, 2014 Share Posted February 13, 2014 Hey Nico, I am curious why you went back to the old method for loading the js file? The way you have it now referencing an external js file doesn't seem to be causing the issues I was having with your old way of injecting the script code directly, but just wondering why you aren't letting PW handle the js file inclusion? Also, while I think of it, it is using .live which is deprecated and needs to be replaced by .on Thanks Link to comment Share on other sites More sharing options...
Radek Posted February 13, 2014 Share Posted February 13, 2014 On 2/13/2014 at 6:43 PM, Nico Knoll said: Tried fixing everything. Have a look and please tell me if it's working: https://github.com/NicoKnoll/ProcessPageDelete Nice, localization working fine and button is hidden in trash. I am using this small module on all projects, so thank you for your good work! 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted February 13, 2014 Author Share Posted February 13, 2014 @radek: Thanks! @adrian: I had to do this because your solution wasn't properly working when the module uses autoload=true (what it needs to use). So the js file would be included at the first position of all js files which means before jquery is included. The result was that you'd never see the actual confirm thing... Link to comment Share on other sites More sharing options...
adrian Posted February 13, 2014 Share Posted February 13, 2014 That's weird that you are seeing that. I get the following in this order: <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=183'></script> <script type='text/javascript' src='/site/modules/ProcessPageDelete/ProcessPageDelete.js?v=1'></script> and the confirm alert works fine! Link to comment Share on other sites More sharing options...
lpa Posted February 17, 2014 Share Posted February 17, 2014 I get this error on my browser: [Error] TypeError: 'undefined' is not a function (evaluating '$("li.PageListActiondelete a").live("click", function(el){ if(!confirm("Are you sure?")) { return false; } })') (unknown function) (ProcessPageDelete.js, line 2) Link to comment Share on other sites More sharing options...
adrian Posted February 17, 2014 Share Posted February 17, 2014 It sounds to me like you might be running a version of jQuery that is 1.9 or greater which doesn't support .live and needs to be changed to .on Link to comment Share on other sites More sharing options...
lpa Posted February 17, 2014 Share Posted February 17, 2014 Yes, I am using the Zurb Foundation 5 profile which has 1.10.x version of jQuery. Maybe the module could be fixed to use .on? Link to comment Share on other sites More sharing options...
adrian Posted February 21, 2014 Share Posted February 21, 2014 On 2/17/2014 at 3:33 PM, lpa said: Yes, I am using the Zurb Foundation 5 profile which has 1.10.x version of jQuery. Maybe the module could be fixed to use .on? It isn't always as simple, but in the case of this module with the way that statement is structured, you can simply replace "live" with "on". If you want you can file an issue over at: https://github.com/NicoKnoll/ProcessPageDelete/issues/new and ask Nico to make the change. I don't think there is any need to worry about detecting the availability of "on" anymore with a "live" fallback, because PW is using jQuery 1.8 which supports "on". 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted February 21, 2014 Author Share Posted February 21, 2014 Okay, closed the issue and updated to "on". Link to comment Share on other sites More sharing options...
onjegolders Posted April 7, 2014 Share Posted April 7, 2014 Hi Nico, hope you're good The JS dialog to confirm delete seems to no longer be there. Was that a conscious decision or perhaps an overwrite? Cheers. Link to comment Share on other sites More sharing options...
Nico Knoll Posted April 17, 2014 Author Share Posted April 17, 2014 Good question - I'll have a look. 1 Link to comment Share on other sites More sharing options...
ceberlin Posted July 29, 2014 Share Posted July 29, 2014 On one installation (using PW dev 2.4.9) I cannot uninstall this module any more. TemplateFile: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'delete-3' for key 'name_parent_id' Link to comment Share on other sites More sharing options...
Nico Knoll Posted July 29, 2014 Author Share Posted July 29, 2014 Hmm, I'll try to reconstruct it Link to comment Share on other sites More sharing options...
ceberlin Posted July 31, 2014 Share Posted July 31, 2014 Hey Nico, this thing is mysterious. With the same setup (PW dev 2.4.9) it makes a difference whether the module was already installed or not: a) If not already installed, I can install it - and later on de-install it again: no problem. b) If it was installed - and it normally is here because It is part of my PW startup profile for new projects - then this conflict appears. My normal workflow is to de-install this module as soon as I am finished with building the site and editors start using it. That's why I know that this issue wasn't always there. Do you need more info from me? Link to comment Share on other sites More sharing options...
Nico Knoll Posted August 1, 2014 Author Share Posted August 1, 2014 Have you tried updating it before uninstall? Because I made some changes in the install/uninstall routine recently. Link to comment Share on other sites More sharing options...
ceberlin Posted August 1, 2014 Share Posted August 1, 2014 Hi Nico, that would explain that newly installed versions work, old installs not. I use ModuleManager do keep Modules up-to-date, your module is the current version. Since this is a standard module I use often when setting up things, this is a very old install, with various updates. So if you changed something with the install routine in the meantime, this might not be compatible with old installs. I wonder how to de-install this best - the brute-force way. Trashing the files and removing the entry from the DB table "modules" is probably not enough... Link to comment Share on other sites More sharing options...
Nico Knoll Posted August 1, 2014 Author Share Posted August 1, 2014 Go into the module file and put the uninstall function into /* */. Then uninstall it. Then go to admin->setup->pages and delete the subpage "delete page". Link to comment Share on other sites More sharing options...
ceberlin Posted August 1, 2014 Share Posted August 1, 2014 ok, de-installation worked with commenting out the uninstall function. I got a message that hooks were removed. There was no "delete page" subpage in admin/setup/pages/. There was one in admin/pages/ - hope that's the one to delete Then I re-installed - de-installed and re-installed again. Works! - Can I invite you to a beer? Link to comment Share on other sites More sharing options...
ceberlin Posted August 1, 2014 Share Posted August 1, 2014 There is another issue, but only on one installation. Here the module does not install properly this time.... Notice: Undefined variable: parent in /Users/carl/WWW_TESTSERVER/ullewaeh-git/site/modules/ProcessPageDelete/ProcessPageDelete.module on line 187 As I said the older versions of the module worked flawlessly. Link to comment Share on other sites More sharing options...
Nico Knoll Posted August 1, 2014 Author Share Posted August 1, 2014 My mistake - corrected it and uploaded it to github. I'm always open for a beer 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