Search the Community

Showing results for tags 'clone'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • ProDrafts
  • ListerPro
  • ProFields
  • ProCache
  • Form Builder
  • Likes
  • ProDevTools
  • Custom Development


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 10 results

  1. There you can download the module : --- Introduction I was not aware of this module/topic and spend some time developing a module to backup, clone and move sites to a local folder or even GoogleDrive and Dropbox. The idea begun when I read about this Wordpress's plugin. I was planning to add features like s/FTP, Amazon Cloud, deployment installer and others great features from Wordpress Duplicator and release it for free to the community. Now that I see this @rot's module , I am wondering if it would be benefit to the community to have a second solution and so, if I should finish it.. ? --- Features / Wishlist : Save package to local folder : implemented Save package to Amazon AWS : implemented Save package to Dropbox : implemented Save package to GoogleDrive : implemented Save package to FTP/FTPS : implemented Manual backup with a standalone button : implemented Backup from scheduled cron job : implemented Exclude by file extension / filename / directory : implemented File naming convention (Y-m-d_H-i-s-description.ext) implemented Protect access to the module screen by role/user implemented Installer / deployment functionality implemented --- 2017-02-07: Starting the CLOSED BETA TESTING. 2017-11-28: Module release - version 0.0.44 at screenshots:
  2. Question 1 I recently installed PW 3.0.62 for a new site and also have sites running older version of PW 3.x. Can I export the database on an older version of PW 3.x and import it to PW 3.0.62 without any issues? Question 2 (This is kind of alternative to the above for long term use - and maybe a better solution...) On the sites I've previously built I have templates (home, basic-page, contact) and fields that I commonly use, such as business_name, phone_1. The last site I built is running PW 3.0.42. I was considering cloning this into a local site and running the upgrade module to bring it up to PW 3.0.62. From there on out when I start I new project I could just run the PW upgrade module, copy the folder to the location for the new project and duplicate the database using the new projects name. So basically, I'll always keep a "blank slate" site that I can just run the PW upgrade on, then duplicate into a new project. This would cut down on the work and time spent having to re-create these common fields, that I use. From there, I would just add fields, templates, etc, specific for the new website project. Is this a sound approach to speed up development?
  3. Hi, I have a small module I created that copies across field content from one page to multiple other pages. I just added a repeater field and while it copies across to the other pages it has caused timeout/memory issues with PHP. I think this is because of the multiple fields within the repeater (title, text caption, image) each being copied multiple times. I thought one way to help would be to not copy images across as they're not needed in the other pages. However I'm unable to figure out how to copy a repeater field excluding one field within the repeater itself. This is my current code: // Inline gallery 1 if(count($page->article_inline_gallery_1)) { $translation->of(false); $translation->article_inline_gallery_1->removeAll(); $gallery = $page->article_inline_gallery_1; foreach($gallery as $item) { $translation->article_inline_gallery_1->import($item); $translation->save("article_inline_gallery_1"); } } At the point that each repeater imported as a whole ->import($item) could anyone help to exclude one of the fields within the repeater?
  4. Fantomas

    Hi all, I'm still new to processwire and now I have to create the first hook. I need to modify the page-clone module, so there is a field in pages that has to be empty after cloning the page. How could I start this task?
  5. Hello, just another wish on my list: Multiple instances for same field. E.g. I have got a simple "text" field that's just a CKEdtior textarea. If I want to use two or more text fields, I need to dublicate the "text" field to something like "text2". I know that every field is unique because of the database structure behind. Is is still possible to make something like this for this problem? Maybe save everything to same table in database but somehow add a "instanceNumber" field that separates "text1" from "text2"? It isn't a big thing, because cloning is easy. I really like to keep redundancies low and cloning fields isn't that great, so I share this wishlist. Maybe there is some way and I don't know about it, so let me know
  6. Hi, now I need your help getting an idea: I've got a page "The Jungle Book" containing details on the book by Rudyard Kipling. With ShoppingCart module, I'd like to offer the book both as a PDF for download as well as a printed version. I added the sc_price and sc_qty fields to the page, which is half of what I need: Now the page renders a button to put the book (let's say it's PDF version) into the shopping cart. How do I add a second version of this product on the same page? Titel, price and all the details will be the same, only the actual type of the product (digital version instead of printed version) differs. Since there will be many different pages with books, manually adding a second page for the printed book is not an option. Thanks for your ideas! sarah P.S.: There is this post by apeisa on adding different variations of a product into the shopping cart. But I haven't figured out what's a good way to refer back to the original page (for getting the product information) once a variation is placed in cart.
  7. Not sure if this is a bug or a feature. PW 2.5 Stable When i clone a field in advanced tab of field settings i got instantly moved to fieldlist after saving, which is kind of annoying as i wanted to clone the field several times Even when i use "Admin Save Actions" Module i still get moved to fieldlist. Have a nice day Norbert
  8. I have cloned (duplicated) a few file input fields today, but found the following odd behaviour: - Drag'n'drop is no longer possible. - Trash icon doesn't display in Mac/Safari + Mac/Chrome. - I can't delete any uploaded files anymore. addtl. infos: Filetypes are usual stuff / allowed file-types (PDF mostly) etc. PW 2.3.2 dev Files are visible in the backend and in the DB. Tried on Mac Safari + Win Google Chrome (in the latter, the trash icon is fine) Due to a large number of input fields, we've resized the input field width to 50 or 25%, but changing them back to 100% didn't do anything.
  9. Hello, For the ticket booking site that I'm working on, I've made seat chart for each theatre. Each seat chart is made using a repeater field called seat_row which has row name, left, center & right columns(they use rangeslider for storing the number of seats. eg, left column might have 1-7 seats, center column will have 8-16seats and right column will have 17-25seats.). For every show, each row has different ticket cost. What I want to do is, whenever I add a new show for any drama, the page will get theatre name using a pagefield. This way, I'm linking the seat chart associated with theatre to the show. (If it matters, note that theatre gets it's seat chart using a pagefield which links to children of page "maps" where each child page is a map for a theatre.) Now, that I've got the seat chart for the show, I need to add another column to the seat_row repeater field, called row_cost which will store the ticket cost for that row, for that particular show. I guess, cloning the seat map for each show can be a solution. I'd like to know if this is a right solution or if there's any other simpler way. Thank you all in advance.
  10. Im making a module to clone a pre defined page tree. This module is called CustomerStructureCloner. I have to fill in a new customer name that will be used as page title and page name. But im having dificulties with some error i dont understand: It clones the first page but not the children. It also doent rename the first page. But instead i get the following error message: Incorrect integer value: '' for column 'data_max' at row 1 Im using the following code inside the module: public function ___execute() { $error = $this->_("Unable to load page"); $id = 1005; // ID of /structure/customer/ if(!$id) throw new WireException("$error A"); $customer = $this->pages->get($id); $form = $this->modules->get("InputfieldForm"); $form->attr('action', './add/'); $form->attr('method', 'post'); $form->description = 'Vul hieronder de naam van de klant in.'; // Form description/headline $n = 1; $root = $this->pages->get('/'); while(count($root->children("include=all, name={'klantnaam'}-$n"))) $n++; $field = $this->modules->get("InputfieldPageTitle"); $field->attr('name', 'clone_page_title'); $field->attr('value', 'Klantnaam ' . sprintf($this->_n("(copy)", "(copy %d)", $n), $n)); // Phrase added to page title to make it unique $field->label = $this->_("Naam van de klant"); // Label for title field $description = "Vul hier een unieke klantnaam in. Deze klantnaam mag niet al bestaan. "; $description .= "Vervolgens wordt er een één-op-één copie gemaakt van de pagina %s en alle onderliggende pagina's"; $field->description = sprintf($this->_($description), $customer->path); // Form description/headline $form->add($field); $field = $this->modules->get("InputfieldSubmit"); $field->attr('name', 'submit_clone'); $form->add($field); return $form->render(); } /** * Called when the URL is this module's page URL + "/add/" * */ public function ___executeAdd() { $input = $this->input; // add a breadcrumb that returns to our main page $this->breadcrumbs->add(new Breadcrumb('../', 'Nieuwe klant toevoegen')); $error = $this->_("Unable to load page"); $id = 1005; // ID of /structure/customer/ if(!$id) throw new WireException("$error A"); $customer = $this->pages->get($id); $root = $this->pages->get('/'); $pageName = $this->sanitizer->pageName($input->post->clone_page_title); $nameTaken = count($root->children("name=$pageName, include=all")) > 0; $clone = $this->pages->clone($customer, $root); if(!$clone->id) throw new WireException(sprintf($this->_("Unable to clone page %s"), $customer->path)); if(strlen($pageName)) { if($nameTaken) $this->error(sprintf($this->_("The name '%s' was already taken, so one was automatically assigned."), $pageName)); else $clone->name = $pageName; $clone->title = $input->post->clone_page_title; $clone->save(); $this->message(sprintf($this->_('Cloned page "%1$s" to "%2$s"'), $customer->name, $clone->name)); } //$this->session->redirect($this->config->urls->admin . 'page/list/?open=' . $clone->id); } What could be the problem that it doesnt clone its children too and doesnt rename the page? Edit: A little update, All the pages templates to be cloned have the right "Family" settings, so they are allowed to be eachothers parent and/or children.