Hi,

When I use this module, it does not export any yml files.

Steps:
1. Installed 'Views Migration' module Version: 7.x-2.0-alpha6
2. Went to /admin/config/view-migration/settings
3. Entered path in the input box 'Enter views export path here'
4. Press 'Save Configuration'

Result:
It only gives message 'The configuration options have been saved'. But does not save any yml file to given location.

I have followed same instructions/steps that are mentioned on module page.

Is there I am missing something?

Thanks!

Comments

shailesh.bhosale created an issue. See original summary.

Lavnish’s picture

Hi Shailesh,

Apologies for late reply, Busy in other heavy stuff.

I am working on it, will update the minor code changes and soon will release the new version. After that please check. Thanks for reporting the issue.

Thanks!

jayvolk’s picture

It didn't work for me either.. what I had to do (on Ubuntu) is use a path like this: \var\www\{your directory}\sites\default\files\viewsexport ... notice the path separator is backward from normal. Also the path needs to be world writable.... have not tried to import the yml files yet tho'..... we will see about that.

tky’s picture

I have the same issue here, exactly like jayvolk's.

Jumoke’s picture

Anyone has any luck with this?

Tsegaye’s picture

Temporary fix. I uncommented the part in view_migration.admin.inc to accept a default file path, views_exports in files/.

/**
* Parse Drupal 7 view fields and generate a yml file
* containing configuration data.
*/
function CreateViewParser($viewData,$viewName,$viewsFilePath) {
	
	//Created New YML file in Folder;
	$folder = 'public://views_exports/';
	file_prepare_directory($folder, FILE_CREATE_DIRECTORY);
	if ($wrapper = file_stream_wrapper_get_instance_by_uri($folder)) {
	  $path = $wrapper->realpath();
	}
	
	$file = $viewsFilePath .'/views.view.'.$viewName.'.yml';
	$file = drupal_get_path('module', 'custom_view') . '/exports/views.view.'.$viewName.'.yml';

I have also added the default attribute to the form in the function views_migration_admin_settings in the view_migration.module page:

'#default_value' => 'public://views_exports/'

Now, in your files folder, you will get the yaml files in /views_exports

SBDC’s picture

Tried #6 and whilst the "views_export" folder was created in my files folder, no yaml files ever appeared though.

Has anyone got this working?

bisonbleu’s picture

Component: User interface » Code
Priority: Normal » Major

I just tried this with and without the fix in #6 and it doesn't work.
Setting priority to Major because the module is broken and and does not work as advertised.

p.s. There a re lots of errors in the dblog such as

Warning: file_put_contents(public://views_exports__/views.view.redirects.yml): failed to open stream: "DrupalPublicStreamWrapper::stream_open" call failed in CreateViewParser() (line 594 of /sites/all/modules/contrib/view_migration/view_migration.admin.inc).

elimw’s picture

I managed to get this module working without having to do #6. I created a directory in sites/default/files and set that as my export path.

I couldn't find it in any of the documentation but basically, the destination has to exist prior to export (e.g. /var/www/my_site/sites/default/files/views_export)

serverjohn’s picture

To go expand on elimw's comment (#9)...

  1. #6 fix is not needed
  2. Create a views_exports folder in your site's files folder
  3. Use the relative path of sites/default/files/views_exports
    • Note: there is not a leading forward slash
    • Note: the default folder may be named something else in your environment
joshuasosa’s picture

Steps in #10 worked for me, thanks!

ianchan’s picture

#10 also worked for me.