Jump to content
adrian

Batch Child Editor

Recommended Posts

1 hour ago, mel47 said:

@adrian sorry for the delay. I finally was able to test it, and it rocks! html tags are now imported correctly.

Great to hear!

 

1 hour ago, mel47 said:

I still have difficulties with export : when some fields (images or files) are empty, the content of body field is replicated.

I am having troubles replicating this - any chance of getting access to the admin of the server so I can take a look? If not, could you perhaps test to see if there is some specific combination that causes this problem for you. Does it only happen with multilanguage fields? Any specific file/image settings that are needed? If you could start from a fresh PW install with default textarea and image fields and try to figure out what setting may be causing the problem that would be very helpful.

 

1 hour ago, mel47 said:

Concerning multilanguage, could you give an hint of how to use it? Do I can import in 2 languages at the same time? Anyway, I discovered a workaround couple weeks ago. If I changed default language, I could import in this language. So I will do 2 imports, which is not so bad, considering I planned to used it only once to migrate my website content.

I honestly haven't looked into it yet. I am glad that your workaround of changing the default language works for you. I think supporting ML importing could get tricky - how would you delineate between the content for each language? Would it be separate CSV "columns"? I guess if there was a column for each language for each field that is ML it should work. I don't have time to look into it at the moment, but I am actually starting on my first ML client site, so I will be learning lots more about ML and might get some insight into the best approach.

Share this post


Link to post
Share on other sites

@adrian Thanks for the welcome and for offering your help! I'm using the latest version of BCE that's available through PW, 1.3.6 (I cannot update the files on the server manually with the latest version from GitHub as there is an issue with the writing rights on the server). I'll message you with example data and all the information that may be relevant for figuring this out.

Share this post


Link to post
Share on other sites
6 minutes ago, Naz said:

I cannot update the files on the server manually with the latest version from GitHub

Whenever I commit a new version to Github I always update the PW modules directory, so you should always be able to get the latest version (which is 1.3.6) that way.

  • Like 1

Share this post


Link to post
Share on other sites

Hi! When I set to "Load open, not collapsed" BCE works as expected. Then I disabled this option but BCE still loads open, not collapsed.

Share this post


Link to post
Share on other sites
7 hours ago, matjazp said:

Hi! When I set to "Load open, not collapsed" BCE works as expected. Then I disabled this option but BCE still loads open, not collapsed.

My initial testing here shows that it is working as expected, so there must be some combination that you have that I am not testing. Can you please provide some screenshots to demonstrate the problem?

Share this post


Link to post
Share on other sites

Sure. While I'm here, what is the purpose of "Overwrite names"? I see no difference in this is checked or not.

bce.gif

Share this post


Link to post
Share on other sites

I think what you are seeing is because you have already saved that page - when there is a ?s=1 in the URL it opens regardless of that setting. If you load another page and then come back to this page, it should be collapsed if that setting is unchecked.

Regarding the "Overwrite Names" - this is working for me - remember the note mentions that it's only relevant in Edit and Update modes. If checked and you change the title of the page, the name will also change. Are you not seeing this?

  • Like 1

Share this post


Link to post
Share on other sites

You are right, I had ?s=1 in the url, didn't notice... And name change is working of course. Thank you and sorry for taking your time. 

  • Like 1

Share this post


Link to post
Share on other sites
Just now, matjazp said:

You are right, I had ?s=1 in the url, didn't notice... And name change is working of course. Thank you and sorry for taking your time. 

No problem at all :) I was never quite sure if that was the best approach to overriding that open/collapsed setting, but thought in general that once you have saved a page once, you'll probably want it open while you are still working on it and haven't navigated away. I am open to suggestions though.

Glad the name change is working as expected - I really like that option (which is of course why I also built: http://modules.processwire.com/modules/page-rename-options/), especially during development - I think I would go crazy without it :)

Btw, I just committed some updates to BCE - I recently changed the way CSV files are parsed and I just realized I introduced a bug when the field names were in the first row. Anyway, you should update when you get a chance.

  • Like 2

Share this post


Link to post
Share on other sites

Howdy,

I have BCE 1.3.8 installed and just upgraded from ProcessWire 2.7.2 to 3.0.36. When I Export pages to CSV, the created file starts with

<br />
<b>Notice</b>:  Trying to get property of non-object in <b>[...]/site/assets/cache/FileCompiler/site/modules/BatchChildEditor/ProcessChildrenCsvExport.module</b> on line <b>159</b><br />

and the actual csv-formatted data starts after that. Any thoughts?

  • Like 1

Share this post


Link to post
Share on other sites

Hi @tkaranka - sorry about that. However, I am not seeing the problem here, so I might need a little more info from you. That error comes from code dealing with field types that extend Multi - the most common one being images so I am wondering if there is something specific about the setup of that field.

Could you please try to dump the value of: $fieldName just before line 159. And also, the value of: count($p->$fieldName)

Tracy's bd() will be the easiest way to do this if you have it installed.

Thanks!

Share this post


Link to post
Share on other sites

Thanks, @adrian, for the quick response!

The most peculiar thing happened; as I went to install Tracy and decided to try exporting once again just because before diving into Tracy's settings, the export worked as it should. No error message no more! So all's fine now.

Sometimes these things just go way over my head. Sorry this took some of your time too!

Share this post


Link to post
Share on other sites
1 hour ago, tkaranka said:

Thanks, @adrian, for the quick response!

The most peculiar thing happened; as I went to install Tracy and decided to try exporting once again just because before diving into Tracy's settings, the export worked as it should. No error message no more! So all's fine now.

Sometimes these things just go way over my head. Sorry this took some of your time too!

I wouldn't ignore it completely just yet. Any chance the error comes back if Tracy is disabled?

I am going to be away for the next two weeks, but let me know what you find and I'll take a further look then.

 

  • Like 1

Share this post


Link to post
Share on other sites

...oh yes, you are right. The error does come back if I uninstall Tracy.

Share this post


Link to post
Share on other sites

@adrian Is it possible to hook the "Process Children CSV Export" to a Lister Pro View so that I can export all filtered entries that are actually shown?
The process should be something like:

Goto Lister Page
Filter my results
Press "Export as CSV" Button

How would I do that?

Share this post


Link to post
Share on other sites
1 hour ago, mr-fan said:

@jmartsch there is a Lister Pro Action for this export as CSV i thought?

@mr-fan You are right. I did not knew that Lister Pro came with additional downloadable modules. Found them in the Forum.

 

Share this post


Link to post
Share on other sites

Hi @adrian

Two questions :

  1. When I export as CSV a field "Page" (Unique, select), it doesn't work. However if I change to Page - multiple - ChosenSelectMultiple, it works fine. It's not a big problem, since I change to multiple even if I want only one page, but it's a little bit counter-intuitive.
  2. Is it possible to create a new page (authors) (from a field page(author)) by using BCE? I can import only pages (authors) already created. Again, I can import as first step those authors, but I would rather prefer import publications and automatically creating author. On side note, creating page is activated and works fine if I use PW interface.

My tree is something like this:

Publications (page)
---Author (field, type page from Author)

Authors (page)
---Title
 

Thanks again.

Mélanie

Share this post


Link to post
Share on other sites

@mel47 Hi, Just to let know know in case you are not aware of it that Adrian is away for another week or so, but I'm sure he will reply asap as soon as he is back.

  • Like 1

Share this post


Link to post
Share on other sites

Hi @mel47 - sorry for the delay on this. I have just committed a fix - could you please take a look and let me know if you have any other problems?

I also fixed an issue with multiple values when you want a line break (\r) as the separator. I am converting \r to chr(13) and \n to chr(10). I know that \r works on Mac Excel, but from reading around I think you need \n for Windows, but you guys can test that out.

  • Like 2

Share this post


Link to post
Share on other sites
On 10/23/2016 at 3:27 PM, mel47 said:

Is it possible to create a new page (authors) (from a field page(author)) by using BCE? I can import only pages (authors) already created. Again, I can import as first step those authors, but I would rather prefer import publications and automatically creating author. On side note, creating page is activated and works fine if I use PW interface.

Sorry I forgot about this part of your message. 

I have just added support for this, along with the ability to import page fields with multiple values (by title). Note that you can adjust the separator for multiple pages (eg authors in your example, although I think you may not make use of the multiple option).

Please let me know how this goes for you - it hasn't been well tested and there is quite a bit going to support all this.

 

Share this post


Link to post
Share on other sites

Just playing around with the AdminOnSteroids filter on BCE and thought maybe a new "View" mode for BCE might be nice. 

I simplified everything right down by removing all labels and using the "Replace" option for the Position setting in BCE, so this is all you see on the Children tab. 

Wondering if you guys (especially @tpr - our resident admin tweaker) have any thoughts on tweaking this new "View" mode so it's a nice replacement for the standard Children tab view. FYI, the edit icon opens the page for editing a modal.

I feel BCE needs some more options for controlling what user roles get access to which modes so that it is possible to restrict some to just this mode, which I think it a nice replacement for the Children tab, which for the most part I don't really see much value in with its current layout which is basically a reproduction of what you get in the main page tree view.

Any thoughts?

Screen Shot 2016-11-05 at 7.17.41 PM.png

Share this post


Link to post
Share on other sites

I guess I'm missing something, but what benefits does this new View Mode have over the Edit Mode? The AOS filter can search for any text in the rows (eg. page name, template name) so it's reducing its functionality. I can tweak the filter to trigger the Edit icon instead the View if you think this would be the main benefit.

Share this post


Link to post
Share on other sites
8 hours ago, tpr said:

I guess I'm missing something, but what benefits does this new View Mode have over the Edit Mode? The AOS filter can search for any text in the rows (eg. page name, template name) so it's reducing its functionality. I can tweak the filter to trigger the Edit icon instead the View if you think this would be the main benefit.

You might be right - the idea was for a simplified view for site editors that you think can't be trusted with the Edit mode, or just so you can see the entire page title (if you have long titles (like news articles etc) cleanly. I haven't committed this new version yet, so I'll see if others have any comments.

Share this post


Link to post
Share on other sites

@tkaranka - just wondering if the fixes I made for @mel47 helped with error you were getting? If not, could you please provide some details on the field type that was causing the error and I'll get it fixed.

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 d'Hinnisdaël
      Happy new year, everybody 🥬
      I've been sitting on this Dashboard module I made for a client and finally came around to cleaning it up and releasing it to the wider public. This is how it looks.
      ProcessWire Dashboard

      If anyone is interested in trying this out, please go ahead! I'd love to get some feedback on it. If this proves useful and survives some real-world testing, I'll add this to the module directory.
      Download
      You can find the latest release on Github.
      Documentation
      Check out the documentation to get started. This is where you'll find information about included panel types and configuration options.
      Custom Panels
      My goal was to make it really simple to create custom panels. The easiest way to do that is to use the panel type template and have it render a file in your templates folder. This might be enough for 80% of all use cases. For anything more complex (FormBuilder submissions? Comments? Live chat?), you can add new panel types by creating modules that extend the DashboardPanel base class. Check out the documentation on custom panels or take a look at the HelloWorld panel to get started. I'm happy to merge any user-created modules into the main repo if they might be useful to more than a few people.
       Disclaimer
      This is a pre-release version. Please treat it as such — don't install it on production sites. Just making sure 🍇
      Roadmap
      These are the things I'm looking to implement myself at some point. The wishlist is a lot longer, but those are the 80/20 items that I probably won't regret spending time on.
      Improve documentation & add examples ⚙️ Panel types Google Analytics ⚙️ Add new page  🔥 Drafts 🔥 At a glance / Page counter 404s  Layout options Render multiple tabs per panel panel groups with heading and spacing between ✅ panel wrappers as grid item (e.g. stacked notices) ✅ Admin themes support AdminThemeReno and AdminThemeDefault ✅ Shortcuts panel add a table layout with icon, title & summary ✅ Chart panel add default styles for common chart types ✅ load chart data from JS file (currently passed as PHP array) Collection panel support image columns ✅ add buttons: view all & add new ✅
    • By Pip
      Hi everyone!
      I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. 
      Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. 
      Thing is I'd like to grant my new users the power to create their own pages. Any advice? 
      Thanks. 
    • 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-07-03 -- SnipWire 0.8.7 (beta) released! Fixes some small bugs and adds an indicator for TEST mode 2020-04-06 -- SnipWire 0.8.6 (beta) released! Adds support for Snipcart subscriptions and also fixes some problems 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 ----
       
    • By Sten
      Hello
      Till now I hacked something with the twig template but it works no more with new PW versions so I look forward to create a module. I am working on a site in multiple languages : French, English, Italian, German, Spanish, Portuguese, Hebrew, Russian. The new posts are entered in any language with a field for language. Till now, I got twig files to get the translations with constants defined for each part of the pages.
      So I'd like to create a module to include theses files added according to the url /fr/en/...
      Have you some observations to do before I begin about the direction to take ?
      Thank you
    • By ukyo
      Mystique Module for ProcessWire CMS/CMF
      Github repo : https://github.com/trk/Mystique
      Mystique module allow you to create dynamic fields and store dynamic fields data on database by using a config file.
      Requirements
      ProcessWire 3.0 or newer PHP 7.0 or newer FieldtypeMystique InputfieldMystique Installation
      Install the module from the modules directory:
      Via Composer:
      composer require trk/mystique Via git clone:
      cd your-processwire-project-folder/ cd site/modules/ git clone https://github.com/trk/Mystique.git Module in live reaction with your Mystique config file
      This mean if you remove a field from your config file, field will be removed from edit screen. As you see on youtube video.
      Using Mystique with your module or use different configs path, autoload need to be true for modules
      Default configs path is site/templates/configs/, and your config file name need to start with Mystique. and need to end with .php extension.
      Adding custom path not supporting anymore !
      // Add your custom path inside your module class`init` function, didn't tested outside public function init() { $path = __DIR__ . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR; Mystique::add($path); } Mystique module will search site/modules/**/configs/Mystique.*.php and site/templates/Mystique.*.php paths for Mystique config files.
      All config files need to return a PHP ARRAY like examples.
      Usage almost same with ProcessWire Inputfield Api, only difference is set and showIf usage like on example.
      <?php namespace ProcessWire; /** * Resource : testing-mystique */ return [ 'title' => __('Testing Mystique'), 'fields' => [ 'text_field' => [ 'label' => __('You can use short named types'), 'description' => __('In file showIf working like example'), 'notes' => __('Also you can use $input->set() method'), 'type' => 'text', 'showIf' => [ 'another_text' => "=''" ], 'set' => [ 'showCount' => InputfieldText::showCountChars, 'maxlength' => 255 ], 'attr' => [ 'attr-foo' => 'bar', 'attr-bar' => 'foo' ] ], 'another_text' => [ 'label' => __('Another text field (default type is text)') ] ] ]; Example:
      site/templates/configs/Mystique.seo-fields.php <?php namespace ProcessWire; /** * Resource : seo-fields */ return [ 'title' => __('Seo fields'), 'fields' => [ 'window_title' => [ 'label' => __('Window title'), 'type' => Mystique::TEXT, // or InputfieldText 'useLanguages' => true, 'attr' => [ 'placeholder' => __('Enter a window title') ] ], 'navigation_title' => [ 'label' => __('Navigation title'), 'type' => Mystique::TEXT, // or InputfieldText 'useLanguages' => true, 'showIf' => [ 'window_title' => "!=''" ], 'attr' => [ 'placeholder' => __('Enter a navigation title') ] ], 'description' => [ 'label' => __('Description for search engines'), 'type' => Mystique::TEXTAREA, 'useLanguages' => true ], 'page_tpye' => [ 'label' => __('Type'), 'type' => Mystique::SELECT, 'options' => [ 'basic' => __('Basic page'), 'gallery' => __('Gallery'), 'blog' => __('Blog') ] ], 'show_on_nav' => [ 'label' => __('Display this page on navigation'), 'type' => Mystique::CHECKBOX ] ] ]; Searching data on Mystique field is limited. Because, Mystique saving data to database in json format. When you make search for Mystique field, operator not important. Operator will be changed with %= operator.
      Search example
      $navigationPages = pages()->find('my_mystique_field.show_on_nav=1'); $navigationPages = pages()->find('my_mystique_field.page_tpye=gallery');
×
×
  • Create New...