Comments

webfaqtory created an issue. See original summary.

webfaqtory’s picture

Issue summary: View changes
kfritsche’s picture

From just looking at the code this should be easily fixable:

In src/Form/ContentExportTrait.php replace

protected function generateSiteUUIDFile($data, &$context) {

with

public function generateSiteUUIDFile($data, &$context) {

and

  protected function finishContentExportBatch($success, $results, $operations) {

with

  public function finishContentExportBatch($success, $results, $operations) {

Would be a good novice issue to create the patch here and test if this works.

kfritsche’s picture

Status: Active » Needs work
Prabhu.shan’s picture

Hi,

After doing the below changes as suggested,

In src/Form/ContentExportTrait.php replace

protected function generateSiteUUIDFile($data, &$context) {
with

public function generateSiteUUIDFile($data, &$context) {
and

protected function finishContentExportBatch($success, $results, $operations) {
with

public function finishContentExportBatch($success, $results, $operations) {

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=135&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Class 'Drupal\content_sync\Form\Yaml' not found in Drupal\content_sync\Form\ContentExportForm->generateSiteUUIDFile() (line 112 of /var/www/html/modules/contrib/content_sync/src/Form/ContentExportTrait.php).

ok-steve’s picture

Issue summary: View changes
StatusFileSize
new1.17 KB

I successfully made the changes. The errors from #5 were cause because the ContextExportTrait.php file didn't include the use statement for Yaml.

I didn't make the finishContentExportBatch method public because the problem was resolved without needing to.

Prabhu.shan’s picture

Great.. Thanks for fixing.. Is it merged ? Can i download the dev version and check it out?

auxiliaryjoel’s picture

Sccherry I tried to CLI your patch but I received this error:
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?

do you know what i'm doing wrong? the CLI I entered was:
curl https://www.drupal.org/files/issues/2018-06-07/content_sync-batch-export... | patch -p1

ok-steve’s picture

@auxiliaryjoel Which directory are you in? When I ran your command in the Drupal root directory I saw the same error message you did, but when I ran the command from the content_sync directory it worked fine.

asirjacques’s picture

Hi there,

@8auxiliaryjoel: I've been adding the patch into my composer.json

I can confirm the patch solve the issue and work as expected.

This should go into the next release.

blanca.esqueda’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.56 KB

Thank you for the patch,

I've reviewed it and included:
* Updated path for the finished batch callback.
* Removed some warnings happening on the finished callback.
* Specified the archive compress type.

I'll include the change on 8.x-2.x-dev and it will be on the next release.

  • Blanca.Esqueda committed 709584e on 8.x-2.x
    Issue #2966022 by sccherry, Blanca.Esqueda, webfaqtory, kfritsche,...
blanca.esqueda’s picture

Status: Reviewed & tested by the community » Fixed
blanca.esqueda’s picture

Status: Fixed » Closed (fixed)