Jump to content
adrian

Batch Child Editor

Recommended Posts

Same here, 2.6.17 + latest BCE dev and no issues, except the shift-click one and sortable table headers.

The latter could be removed using "$table->setSortable(false);" in the module, if not required. Header items are still clickable though (because the CSS cursor: pointer).

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for those reports - The problems you were having is due to the new AJAX loading of the Children tab in recent dev versions of PW. I had fixed that in the dev version of BCE, but never ported back to master.

I am testing your checkbox toggles here and they work great, but a couple of things need fixing. In the screenshot you'll see that the checkbox is above the column header label - seems to be an issue when the title/name of the child page is really long. 

post-985-0-22979300-1442246345_thumb.png

The other more important issue is that the checkboxes don't get loaded when using the new AJAX load option in BCE:

post-985-0-40152100-1442246457_thumb.png

BTW, the AJAX open option is really only useful if you are placing BCE in a new tab or in an inline fieldset in the Content tab, because the Children tab is already AJAX in PW dev.

Would you mind having a look at these and sending me a PR on the dev branch?

Thanks again!

PS I'll look into the issue of the clickable, but not sortable table header links!

Share this post


Link to post
Share on other sites

I'm not sure if that's a Lister issue, but by default the pages should really be sorted by "sort" and not "-modified", which makes less sense in the module's context.

Edit: It would also be nice if there would be a way to exclude some fields (e.g. mode) from the new save-reminder functionality.

Just an FYI - the latest dev version now has the default sort in Lister mode set to "sort" - should be a nicer, more consistent experience!

Share this post


Link to post
Share on other sites

Yeah, that's better for sure. But I'm still wondering, why sorting isn't changeable via a filter.

Share this post


Link to post
Share on other sites

Yeah, that's better for sure. But I'm still wondering, why sorting isn't changeable via a filter.

Ok, you can now define the default sort order in the config settings.

However there is still a problem with adding a sort filter to override the default sort order. On my end at least, this seems to be a problem with Lister itself - I can't add a sort filter for a standard lister. Maybe something wrong with my pW sandbox installation. I will need to investigate this further a little later - no more time right now.

Share this post


Link to post
Share on other sites

Maybe something wrong with my pW sandbox installation. I will need to investigate this further a little later - no more time right now.

Not a problem with your installation. I think it's a problem of lister in general.

Share this post


Link to post
Share on other sites

The other more important issue is that the checkboxes don't get loaded when using the new AJAX load option in BCE:

This should be fixed now. Please stop adding that much features  :P

In the screenshot you'll see that the checkbox is above the column header label - seems to be an issue when the title/name of the child page is really long.

It was an easy fix, adding white-space: nowrap to the thead. At least that was the easiest solution and I don't see any drawbacks.

Clicking on the thead items could replace the header checkboxes, question is that the sort feature will remain or not.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @tpr - I have merged your changes so this functionality is now available on the dev branch of BCE. I really appreciate your work on this!

As for the table sort feature - it would be nice to have this working - I will add to my list of things, but I am pretty short on time at the moment, but again, PR's are most welcome ;)

Given the bugs with the sort handles and the Add New button with stable BCE and dev PW, I would like to merge BCE dev to stable fairly shortly, so if anyone has noticed any other issues, especially with the new Lister mode, the new Inline Fieldset position option, and also the alternative Parent Page option (under the Content / Deletion / Protection settings tab), please let me know.

I do have some tweaks I would still like to make to the Lister mode - mainly getting the "Add New" button to work - I have disabled this for the moment because there are target issues with PW modals when called from inside iframes that I need to figure out, but I still think the current dev version of BCE is now more stable given that so many of us are using the dev version of PW.

Share this post


Link to post
Share on other sites

Actually just created a new PR - row deletion was buggy, it just toggled states instead of setting/unsetting all rows for deletion. Sorry for the inconvenience.

Thanks for your work!

  • Like 1

Share this post


Link to post
Share on other sites

Actually just created a new PR - row deletion was buggy, it just toggled states instead of setting/unsetting all rows for deletion. Sorry for the inconvenience.

Thanks for your work!

Thank you - it's been merged !

  • Like 1

Share this post


Link to post
Share on other sites

And another brick to the wall: setting column header checkboxes based on column items. If all items checked (or marked for deletion), the "check all" column checkbox gets checked. State is also set on loading BCE.

post-3156-0-57070400-1442344607_thumb.gi

  • Like 2

Share this post


Link to post
Share on other sites

Thanks again @tpr - very nice!

I have merged those changes and also merged the dev version of BCE into master. I do have a few more ideas/tweaks to implement, but I'll be working on the master branch again for now.

Note - for those using the new BCE with PW stable I have had to disable the new Lister mode as it won't work properly on PW stable.

Now that this new version is being pushed out through PW module upgrades and lots more users will be using it, please let me know if anyone discovers any issues.

Share this post


Link to post
Share on other sites

Any known limitations with the number of pages/fieldtypes? I'm trying to export a CSV of 400 pages, 25 fields per page. Field types include Title, Checkbox, Page, Text, Options, Page, MapMarker, Textarea, Image, Rangeslider, Datetime and Options.

Exporting a CSV seems to fail, no error message/log as far as I can see though.

Share this post


Link to post
Share on other sites

@ZGD - you are not the first to report this:  https://processwire.com/talk/topic/6102-batch-child-editor/?p=97690

I have my PHP settings (memory, execution time, etc) high enough that I haven't seen this, so the quick fix is to make those adjustments at your end. 

I do however have it on my list to modify the export script so it works in batches so this won't be necessary - thanks for the reminder!

Share this post


Link to post
Share on other sites

some actual testing with BCE get me

Notice: Undefined index: parentPage in S:\DEV\www\xxx\site\modules\BatchChildEditor\BatchChildEditor.module on line 303

Notice: Undefined index: parentPage in S:\DEV\www\xxx\site\modules\BatchChildEditor\BatchChildEditor.module on line 384

Notice: Undefined index: parentPage in S:\DEV\www\xxx\site\modules\BatchChildEditor\BatchChildEditor.module on line 1746

Notice: Undefined index: listerDefaultSort in S:\DEV\www\xxx\site\modules\BatchChildEditor\BatchChildEditor.module on line 1804

PW 2.6.19 - BCE 0.9.9 - local - usage is in the content tab

Best regards mr-fan

  • Like 1

Share this post


Link to post
Share on other sites

Hi @mr-fan,

I think those notices were just a side effect of upgrading from an older version of BCE, but regardless I just committed some changes that should fix them - thanks!

Please let me know if you come across any others.

PS - thanks for all your support for this module - both testing and promoting it in other threads!

Share this post


Link to post
Share on other sites

All notices are gone! ....and i know i owe you the next german translation... :rolleyes: (coming next week for shure)

PS - thanks for all your support for this module - both testing and promoting it in other threads!

This is as a matter of course if i use a module like yours in my projects!

Getting such modules with great support from expirienced developers is a real good thing and my opinon is that even if i don't could code such thing myself i've to support/test/translate or do something else that contributes and honor the author.

(Finally "Opensource" is like sharing time and experience at the same time to benefit - and it only really works if the most participants take part of that game)  added: i've less experience so i'll bring in my time...;)

Best regards mr-fan

Edited by mr-fan
  • Like 1

Share this post


Link to post
Share on other sites

Hi everyone,

New version committed to the dev branch which adds some interesting new features. I have had some clients confused by the use of child pages for repeatable elements. I know we have PageTable, but a couple of versions ago in BCE I introduced the ability to embed the editor within the Content tab (or a new tab, etc). This provides an alternate interface for editing child pages within the parent page. I think this was useful (and has become my default over PageTables). It can be especially cool in Lister mode where you can have inline ajax editing of child pages.

This new version adds the ability to hide the child pages from the Page Tree and and also if you want, to hide the Children Tab. This means that clients have no idea that the content is stored in child pages. I know that you can also do this with an external page tree for PageTables, but that hidden "black box" still makes me a little uncomfortable at times, so this is a bit of a best of both worlds. 

The only catch with the hiding of child pages in the Page Tree is the count of child pages. To make it work I needed to make the core Page::numChildren method hookable. I have asked Ryan if he'd be willing to do that in the core, but for now if you want this feature to work properly, you will need to make this change yourself.

Here are some screenshots of the new options and functionality.

Two new settings:

post-985-0-19449100-1446199219_thumb.png

Note that the About page has no children listed:

post-985-0-67000800-1446199209_thumb.png

Child pages are editing within the content tab, but nowhere else because the Children tab is also hidden:

post-985-0-59257800-1446199223_thumb.png

  • Like 3

Share this post


Link to post
Share on other sites

hi adrian,

that is great!! i was also a little uncomfortable with the pagetable and external parent setup. are there any issues regarding pagination or will this also be solved when numChildren is hookable?

Share this post


Link to post
Share on other sites

Bernhard - that's a good question.

In general hiding pages in the Page Tree can be problematic with child count and pagination, but I don't think this will be a problem for BCE given that when it hides pages it hides all the children of the page (not a select list). That said, this new feature is not well tested yet (which is why it is in the dev branch), but I am implementing it on a live site in the next day or two, so it will get some good testing pretty soon.

Give it a go and let me know what you find - I am undecided at the moment if this is a good idea or a bit of a hack, but I really like the way it looks and works!

  • Like 1

Share this post


Link to post
Share on other sites

I love what you're doing here Adrian! It does raise some concerns, but I'm sure it's not too serious :)

I think the children shouldn't be hidden for superuser, have you thought of that possibility? Would actually be nice if you could choose to which roles they will be hidden.

  • Like 1

Share this post


Link to post
Share on other sites

I love what you're doing here Adrian! It does raise some concerns, but I'm sure it's not too serious :)

I think the children shouldn't be hidden for superuser, have you thought of that possibility? Would actually be nice if you could choose to which roles they will be hidden.

I definitely thought about not hiding the children for superusers - just didn't worry about it too much for this first version. Determining which roles they are hidden for is definitely another option. The config settings for this module are definitely getting complex - maybe I have already passed a critical feature-bloat point, but I definitely see your point. 

The main thing I want to improve on is the Lister mode option in this new scenario - I think that it is the most powerful and unique option due to the inline ajax editing - the only catch at the moment is that it is embedded in an iframe (like Ryan did with newish Template > Usage lister. The inline ajax editing works awesome (if you have Lister Pro), but right now Add New and modal editing don't work. I will try to tackle these again shortly. 

Share this post


Link to post
Share on other sites

Just a quick screenshot of the Lister mode in action - note that I have toggled editing on for the first "Story"

post-985-0-63545300-1446234449_thumb.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Just a quick FYI - thanks to a tip from Ryan I have been able to remove the need for making the numChildren method hookable, so if you are interested in the new features on the dev version for hiding the children from the page list view, go take a look now - no need for the core modifications.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Adrian, great module!

I'm trying to use it to export users page into csv, but the module doesn't show in "Users" parent page.

Is there a way to make it work?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MoritzLost
      TrelloWire
      This is a module that allows you to automatically create Trello cards for ProcessWire pages and update them when the pages are updated. This allows you to setup connected workflows. Card properties and change handling behaviour can be customized through the extensive module configuration. Every action the module performs is hookable, so you can modify when and how cards are created as much as you need to. The module also contains an API-component that makes it easy to make requests to the Trello API and build your own connected ProcessWire-Trello workflows.
      Features
      All the things the module can do for you without any custom code: Create a new card on Trello whenever a page is added or published (you can select applicable templates). Configure the target board, target list, name and description for new cards. Add default labels and checklists to the card. Update the card whenever the page is updated (optional). When the status of the card changes (published / unpublished, hidden / unhidden, trashed / restored or deleted), move the card to a different list or archive or delete it (configurable). You can extend this through hooks in many ways: Modifiy when and how cards are created. Modify the card properties (Target board & list, title, description, et c.) before they are sent to Trello. Create your own workflows by utilizing an API helper class with many convenient utility methods to access the Trello API directly. Feedback & Future Plans
      Let me know what you think! In particular:
      If you find any bugs report them here or on Github, I'll try to fix them. This module was born out of a use-case for a client project where we manage new form submissions through Trello. I'm not sure how many use-cases there are for this module. If you do use it, tell me about it! The Trello API is pretty extensive, I'll try to add some more helper methods to the TrelloWireApi class (let me know if you need anything in particular). I'll think about how the module can support different workflows that include Twig – talk to me if you have a use-case! Next steps could be a dashboard to manage pages that are connected to a Trello card, or a new section in the settings tab to manage the Trello connection. But it depends on whether there is any interest in this 🙂 Links
      Repository on Github Complete module documentation (getting started, configuration & API documentation) [Module directory pending approval] Module configuration

    • By MoritzLost
      Process Cache Control
      This module provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
      The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
      Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Clear the ProCache page render cache (if your site is using ProCache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
      An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
      Plans for improvements
      If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
      Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
      Links
      https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory CHANGELOG in the repository Screenshots


    • By Macrura
      PrevNextTabs Module
      Github: https://github.com/outflux3/PrevNextTabs
      Processwire helper modules for adding page navigation within the editor.
      Overview
      This is a very simple module that adds Previous and Next links inline with the tabs on the page editor. Hovering over the tab shows the title of the previous or next page (using the admin's built in jqueryUI tooltips.)
      Usage
      This module is typically used during development where you or your editors need to traverse through pages for the purpose of proofing, flagging and/or commenting. Rather than returning to the page tree or lister, they can navigate with these links.
      Warnings
      If you are using PW version 2.6.1 or later, the system will prevent you from leaving the page if you have unsaved edits.
      For earlier versions, to avoid accidentally losing changes made to a page that might occur if a user accidentally clicks on one of these, make sure to have the Form Save Reminder module installed.
      http://modules.processwire.com/modules/prev-next-tabs/
    • By Gadgetto
      SnipWire - Snipcart integration for ProcessWire
      Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire.
      With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required.
      SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development:

      Status update links (inside this thread) for SnipWire development
      2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems. 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised. 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces. 2020-02-01 -- SnipWire is now available via ProcessWire's module directory! 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory) 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!) 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented? 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features
      Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Multi currency support Custom order and cart fields Process refunds and send customer notifications from within the ProcessWire backend Process Abandoned Carts + sending messages to customers from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links
      SnipWire in PW modules directory SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website  
      ---- INITIAL POST FROM 2019-05-25 ----
       
×
×
  • Create New...