Jump to content

Profile Export module (also upgrade PW 2.0 to 2.1)


ryan

Recommended Posts

Thank you again Ryan!

May I ask a couple of feature related questions? I have just tried out this module for the first time and noticed the following:

1) It is not possible to exclude modules.

Admin related modules are not needed in many cases (such as ProcessDatabaseBackups, ProcessWireUpgrade, ProcessExportProfile, etc...) and it would be nice to be able to optionally exclude them.

2) Custom folders?

Since I followed what is recommended here:


I already have one custom folder called "lib" in my /site folder and my template files use its content. However, the exporter ignored this custom folder. Did I overlook something or is it really the case and I have to manually copy "such things" over?

3) Extra lines inserted into the end of config.php?

I also have extra lines inserted into the end of config.php. It would be nice, if it was possible to optionally inject these extra lines of code to the end of config.php, so that the ProcessWire installer uses the "core config.php" file, but modifies it by adding extra lines to it, lines that are required by the Profile. I have a require_once(dirname(__FILE__).'/lib/Flog.php'); piece of code, and although it is possible to include config.php in the Profile itself, being able to automatically "extend" config.php during the installation process seems to be a better solution.

Or maybe I am just overlooking something :) Sorry if it is just a silly request and there is already a proper way of doing this, of which I know nothing about.

Edit: maybe it is not just config.php but .htaccess too that we should be able to extend the above described (or similar) way.

Edited by szabesz
Link to comment
Share on other sites

  • 1 month later...

Is there any reason why the profile exporter would not export ALL the content of the email field?

I used the default system email field on another template (member's emails). They are not getting exported at all.

Is there a way to export them? Or should I not use the system email field for this purpose?

What about users? Are they not supposed to be imported as well?

Thanks. :)

Link to comment
Share on other sites

  • 6 months later...

Hi,

I got an issue with this module when trying to make a fresh install with my exported profile.

Everything is working well until I try to connect to the existing database. A lot of error occurs, preventing me to continue the installation.

Here is a screenshot of the errors log.

Any idea where is this come from?

Thanks and thanks a lot for this awesome cms and community forum.

Étienne

Capture du 2016-09-09 11-29-56.png

Link to comment
Share on other sites

  • 4 weeks later...
36 minutes ago, Jason Huck said:

Can anyone confirm whether this module works with PW3?

Gave it a quick try. It installed without error and created a .zip file, but it failed to copy over the contents of my /templates directory, and the web-based installer in a fresh PW3 installation fails to see the profile. I guess I'll just manually copy everything over for now.

Link to comment
Share on other sites

  • 1 month later...
On 21.1.2016 at 11:51 PM, bernhard said:

had an issue today when using a name like "example.com transfer profile"

it showed up in the select box but after clicking on "continue" it said "no site profile found"

Same here. Try not use a dot (.) in profile name.

Link to comment
Share on other sites

On 3.10.2016 at 7:35 PM, Jason Huck said:

Can anyone confirm whether this module works with PW3?

I used ProcessExportProfile in Processwire 3.0.3. 

The name fields can not have point character ".". If, than the site-profile is not detected.

The generated config.php file needs the namespace at top, if generating new Classes in the config, like:

<?php namespace ProcessWire;
//...
if(!defined("PROCESSWIRE")) die();
//...
$config->custom_footer_scripts = new FilenameArray(); //own array for js at bottom of page

I like ProcessExportProfile for new Projects — i hope the module is not buried.

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

@ryan, could you please add an option to include setlocale() in the exported config.php if it is defined. Now that PW is giving warnings if setlocale() is missing it would be nice not to have to remember to manually add this each time a profile is installed.

  • Like 4
Link to comment
Share on other sites

  • 7 months later...

Hello all. I've tested a few times the export of a working profile and there seems to be something that I am missing or doing wrong. I am using latest PW version as of now and just setup a multilanguage profile (default one) with minimal touch but just adding a few modules needed for my new project. 

As soon as I export the profile adding a simple name (test) and giving a name Test with some description text and a small image for the preview, it proceeds well and exports the profile, however if I try to reinstall it later it does not show in the profile installer.

Is there anything I could do to make sure the exported profile would work upon moving to a new host or being set by someone else? I was thinking that some modules could cause the issue so tried to disable some of those but had the same result. Sometimes it works, sometimes it does not.

Any ideas/hints where to look for a possible reason? Btw, I am using Apache 2.4 and PHP 5.6 with MySQL 5.6 if that matters.

Link to comment
Share on other sites

Nevermind, I figured it out looking at the content of the folder. It appeared that for some reason there were no profile nor template files iin the appropriate folders. Choosing to create a zipped profile made the export promptly with all the files needed. Tested again to export the profile to a folder and this time it worked like a charm.

Thanks for the nice mod, @ryan and anyone else involved in the coding/testing. I simply can't get enough of PW ;)

Link to comment
Share on other sites

  • 1 month later...

The current version of ProcessExportProfile  module seems to be having issues with not populating data in the exported SQL correctly.

I'm getting errors like:

SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created'

The problem seems to be here:

CREATE TABLE `modules` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class` varchar(128) CHARACTER SET ascii NOT NULL,
  `flags` int(11) NOT NULL DEFAULT '0',
  `data` text NOT NULL,
  `created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `class` (`class`)
) ENGINE=MyISAM AUTO_INCREMENT=188 DEFAULT CHARSET=utf8;

The timestamp value that is exported is an invalid value with mySQL 5.7.14 that I'm using, so the import fails with the mySQL error.

There also seem to be a whole lot of records (ie all the core modules) like the following which also fail on insert:

INSERT INTO `modules` (`id`, `class`, `flags`, `data`, `created`) VALUES('1', 'FieldtypeTextarea', '1', '', '0000-00-00 00:00:00');

Modules that I've installed myself work fine as they have a valid date.

Exported profiles did work in the past, so I'm not sure if this is a Processwire issue, or different mySQL configuration that's being more strict about date formats.

Edited by kongondo
Moved post here to the module's support forum.
Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

Today I noticed that none of the /assets/files are being included in the generated zip file nor using the directory option. The permissions are set and my PW 3.0.109 ProcessModule has no problem r/w any folder in the assets directory. Has anyone experienced this, or can offer some insight?

In addition, it would be nice to have the assets folder contents listed with selectable sub-folders to be included in the final output.

[edit] ProcessExportProfile 3.0.0

Link to comment
Share on other sites

  • 2 weeks later...

Hello there, 

noob here:

I have processwire on a  virtualbox (debian) and I now have a server where I want to have my current work. In the backend I installed "Export Site Profile". On the server there is only debian 9 so far. What is the next step? Do I fist have to install processwire on the server and copy the zip of my current project in some place after the installation?

 

Thank you in advance.

Link to comment
Share on other sites

Hello,

14 hours ago, Marcel said:

What is the next step?

You can use a site profile (even an exported one) only during the installation process of ProcessWire, that is why you need to put your exported and extracted site profile in the root directory of the site next to install.php, meaning alongside with all the other site profiles ProcessWire comes with. Start the installation process as normal and pick your exported site profile when prompted to choose one.

Link to comment
Share on other sites

Almost but you need to extract the zip file. Your exported site profile should look like as if it was just another one bundled with ProcessWire. Eg.:

site-beginner
site-blank
site-classic
site-default
site-languages
site-myexportedprofile
site-regular

 

Link to comment
Share on other sites

Sorry as noob I just want to be sure

1. unzip the exported zip file in /var/www/html (the structure is site-project-export>assets | install | modules | templates | config.php

2. get to the browser and follow install process

 

right?

Link to comment
Share on other sites

  • 1 year later...

Today I exported a site profile. After installing a new PW instance and put my site-boilerplate folder in the root, and deleted the default site-profiles, PW just outputs an error on the install screen "no profiles found". I'm puzzled. When I put the default site profiles back in, it recognizes them all - except my own.

Is this module even maintained anymore?

After reading this thread, I also checked for any special characters in the profile name, there's nothing like that. I also compared the .json and .sql files in the install-folder: they look identical to me in structure.

  • Like 1
Link to comment
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
×
×
  • Create New...