Open betterapp opened 2 years ago
Please update to latest stable. We do not support 2.8 anymore. Or is there a reason why you do not update?
We have such configuration. Will it work without change in 3.X ?
Yes, everything which worked in version 2. also works in 3. - we only released a new major version because we introduced the new saving mechanism which is much faster than Pimcore's default saving mechanism. But for existing dataports the "legacy mode" will be enabled and thus Pimcore's default saving mechanism will get used.
Beware that the data query selector FileSystemPath
will only work in Pimcore < 10 because with the flysystem support for asset storage, the getFileSystemPath()
method got removed. Currently thinking about supporting it anyway in Data Director for backwards compatibility if local storage is used with Flysystem...
Alternatively you could use data query selector "url" to get the URL of the asset. This can also be assigned to the Stream
field for imports with target class Asset
.
After upgrade to 3.1.4 I get error in log:
[2022-09-06 08:34:10] php.CRITICAL: Uncaught Error: Class 'Composer\InstalledVersions' not found {"exception":"[object] (Error(code: 0): Class 'Composer\InstalledVersions' not found at /var/www/el.pimcore/www/vendor/blackbit/data-director/Controller/ImportController.php:493)"} []
When I open old DataPort I get:
We do not use Composer 2.
Since 3.1.5 there is a fallback class at vendor/blackbit/data-director/fallback/Composer/InstalledVersions.php
which gets used if not Composer 2 gets used. Any reason why you did not update to latest stable 3.1.14
?
I will update it.
I have a problem. When I try to upgrade to 3.1.15 I got error on clearCache
Pimcore\Composer::clearCache
Fatal error: Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "getRawData" of class "Composer\InstalledVersions". in /home/daniel/Web/extra.pim/vendor/friendsofphp/proxy-manager-lts/src/ProxyManager/Generator/Util/IdentifierSuffixer.php:60 Stack trace:
Hmm, never had this. Can you simply call rm -rf <Pimcore root folder>/var/cache/*
and afterwards try again bin/console cache:clear
. Sometimes the Symfony cache is damaged which prevents even bin/console cache:clear
to work properly.
It will not help.
Your fallback function have only one method:
`<?php
namespace Composer;
use Pimcore\Version;
class InstalledVersions { public static function getVersion() { return Version::getVersion(); } } `
And In our cases this code is runned:
` if (! class_exists(InstalledVersions::class)) { return self::class; }
return sha1(serialize(
method_exists(InstalledVersions::class, 'getAllRawData')
? InstalledVersions::getAllRawData() // Composer >= 2.0.14
: InstalledVersions::getRawData()
));
`
You will have to change your code to
if (! class_exists(InstalledVersions::class) || !method_exists(InstalledVersions::class, 'getRawData')) {
return self::class;
}
Alternatively I could mock all the functions from InstalledVersions
class. But would this help you (e.g. InstalledVersions::getRawData()
would return []
then). I think it makes more sense if you changed your code.
But this is not my code but some package code.
Ok, I will change the DD code to not use the fallabck class but will add a wrapper class which checks if InstalledVersions
exists and if it does, then use it, otherwise return Version::getVersion();
...
let's check this out
when it will be available for production ?
Have just released 3.1.16 which does not create the fallback class for Composer\InstalledVersions
anymore.
Hmm.
Now when I open DataPort (or when I save it) I got the same error like before:
When I run the dataport the log is not created but dataport is runned.
Do you have a call stack? Perhaps I have missed one spot.
Edit: Indeed, I forgot one. Have updated 3.1.16, please try again.
Can You push this change as new TAG ?
Done, please try 3.1.17
Working. Thanks!
On one project we use DD 2.8.7.
When we manually try to start DataPort we got message:
Call to a member function isAllowed() on null