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

@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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      Images can be manipulated like native ProcessWire images (resizing, cropping etc.) Image names are fully searchable through the API Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message to help you edit those pages and remove references there before you can finally delete the image. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Choose whether you want to include child pages of page from step 2 to supply images Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...