Product sitemap error

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
beenzu
Posts: 13
Joined: 12 Feb 2024, 04:08

Product sitemap error

Post by beenzu » 29 Feb 2024, 12:22

win 10/Php 8.2/aimeos 2023

When I run the product/export cronjob on the defualt site, I expect the output in the public directory, but I get the following error message:

fopen(public\aimeos-products-1_2024-02-29_11:48:38.xml): Failed to open stream: No such file or directory. There is nothing in the public directory.

Secondly, I observed that when I run the product/export/sitemap job, it returns an
"aimeos-sitemap-%d.xml" and not the "aimeos-product-sitemap-%d.xml. sitemap file. Could this be an error?

see in ....vendor\aimeos\ai-controller-jobs\src\Controller\Jobs\Product\Export\Sitemap\Standard.php
/**
* Returns the sitemap file name
*
* @param int $number Current file number * @return string File name
*/
protected function sitemapFilename( int $number ) : string
{
return sprintf( 'aimeos-sitemap-%d.xml', $number );
}


/**
* Returns the file name of the sitemap index file
*
* @return string File name
*/
protected function sitemapIndexFilename() : string
{
return 'aimeos-sitemap-index.xml';
}
}

User avatar
aimeos
Administrator
Posts: 8318
Joined: 01 Jan 1970, 00:00

Re: Product sitemap error

Post by aimeos » 01 Mar 2024, 13:22

Can you post the full stack trace of the error, please?
Run "php artisan -vvv aimeos:jobs product/export/sitemap"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

beenzu
Posts: 13
Joined: 12 Feb 2024, 04:08

Re: Product sitemap error

Post by beenzu » 01 Mar 2024, 16:49

Here is the full stack trace of the error:

[2024-02-29 11:48:38] local.ERROR: fopen(public\aimeos-products-1_2024-02-29_11:48:38.xml): Failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): fopen(public\\aimeos-products-1_2024-02-29_11:48:38.xml): Failed to open stream: No such file or directory at C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-core\\src\\MW\\Container\\Content\\Binary.php:43)
[stacktrace]
#0 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\HandleExceptions.php(255): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'fopen(public\\\\ai...', 'C:\\\\xampp\\\\htdocs...', 43)
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(2, 'fopen(public\\\\ai...', 'C:\\\\xampp\\\\htdocs...', 43)
#2 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-core\\src\\MW\\Container\\Content\\Binary.php(43): fopen('public\\\\aimeos-p...', 'r')
#3 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-core\\src\\MW\\Container\\Directory.php(68): Aimeos\\MW\\Container\\Content\\Binary->__construct('public\\\\aimeos-p...', 'aimeos-products...', Array)
#4 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\ai-controller-jobs\\src\\Controller\\Jobs\\Product\\Export\\Standard.php(325): Aimeos\\MW\\Container\\Directory->create('aimeos-products...')
#5 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\ai-controller-jobs\\src\\Controller\\Jobs\\Product\\Export\\Standard.php(395): Aimeos\\Controller\\Jobs\\Product\\Export\\Standard->createContent(Object(Aimeos\\MW\\Container\\Directory), 1)
#6 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\ai-controller-jobs\\src\\Controller\\Jobs\\Product\\Export\\Standard.php(161): Aimeos\\Controller\\Jobs\\Product\\Export\\Standard->export(Object(Aimeos\\MW\\Container\\Directory), false)
#7 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-laravel\\src\\Command\\JobsCommand.php(50): Aimeos\\Controller\\Jobs\\Product\\Export\\Standard->run()
#8 [internal function]: Aimeos\\Shop\\Command\\JobsCommand->Aimeos\\Shop\\Command\\{closure}(Object(Aimeos\\MShop\\Context), Object(Aimeos\\Bootstrap), 'product/export')
#9 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-base\\src\\Process\\Decorator\\Check.php(63): call_user_func_array(Object(Closure), Array)
#10 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-laravel\\src\\Command\\JobsCommand.php(59): Aimeos\\Base\\Process\\Decorator\\Check->start(Object(Closure), Array, false)
#11 [internal function]: Aimeos\\Shop\\Command\\JobsCommand->Aimeos\\Shop\\Command\\{closure}(Object(Aimeos\\MShop\\Context), Object(Aimeos\\Bootstrap))
#12 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-base\\src\\Process\\Decorator\\Check.php(63): call_user_func_array(Object(Closure), Array)
#13 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-laravel\\src\\Command\\AbstractCommand.php(63): Aimeos\\Base\\Process\\Decorator\\Check->start(Object(Closure), Array, false)
#14 C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-laravel\\src\\Command\\JobsCommand.php(65): Aimeos\\Shop\\Command\\AbstractCommand->exec(Object(Aimeos\\MShop\\Context), Object(Closure), 'default')
#15 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(36): Aimeos\\Shop\\Command\\JobsCommand->handle()
#16 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#17 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#18 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#19 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#20 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(211): Illuminate\\Container\\Container->call(Array)
#21 C:\\xampp\\htdocs\\aimeos\\vendor\\symfony\\console\\Command\\Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#22 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#23 C:\\xampp\\htdocs\\aimeos\\vendor\\symfony\\console\\Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#24 C:\\xampp\\htdocs\\aimeos\\vendor\\symfony\\console\\Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Aimeos\\Shop\\Command\\JobsCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 C:\\xampp\\htdocs\\aimeos\\vendor\\symfony\\console\\Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#26 C:\\xampp\\htdocs\\aimeos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#27 C:\\xampp\\htdocs\\aimeos\\artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#28 {main}
"}

------
I ran "php artisan -vvv aimeos:jobs product/export/sitemap" and got the following msg:

C:\xampp\htdocs\aimeos>php artisan -vvv aimeos:jobs product/export/sitemap
Executing Aimeos jobs "product/export/sitemap" for "default"
Executing Aimeos jobs "product/export/sitemap" for "kopala"
Executing Aimeos jobs "product/export/sitemap" for "foodnet"
Executing Aimeos jobs "product/export/sitemap" for "livestock"

But where are the sitemaps? I am a bit in the woods here! Will appreciate some hints...

User avatar
aimeos
Administrator
Posts: 8318
Joined: 01 Jan 1970, 00:00

Re: Product sitemap error

Post by aimeos » 04 Mar 2024, 08:09

beenzu wrote: 01 Mar 2024, 16:49 [2024-02-29 11:48:38] local.ERROR: fopen(public\aimeos-products-1_2024-02-29_11:48:38.xml): Failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): fopen(public\\aimeos-products-1_2024-02-29_11:48:38.xml): Failed to open stream: No such file or directory at C:\\xampp\\htdocs\\aimeos\\vendor\\aimeos\\aimeos-core\\src\\MW\\Container\\Content\\Binary.php:43)
Looks OK. Does the ./public/ directory exists?
beenzu wrote: 01 Mar 2024, 16:49 I ran "php artisan -vvv aimeos:jobs product/export/sitemap" and got the following msg:

C:\xampp\htdocs\aimeos>php artisan -vvv aimeos:jobs product/export/sitemap
Executing Aimeos jobs "product/export/sitemap" for "default"
Executing Aimeos jobs "product/export/sitemap" for "kopala"
Executing Aimeos jobs "product/export/sitemap" for "foodnet"
Executing Aimeos jobs "product/export/sitemap" for "livestock"

But where are the sitemaps? I am a bit in the woods here! Will appreciate some hints...
They will be created in the ./public/ directory too as "aimeos-sitemap*.xml".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply