eZ Platform Discussions

"var_site" parameter with eZPlatform 2.0 + Legacy Bridge 2.0 + Netgen Admin UI 2.1


#1

Hi,

I think I have found an issue with “var_site” parameter, in the following context:
eZPlatform 2.0 + Legacy Bridge 2.0 + Netgen Admin UI 2.1

I have found a solution --> please tell me if it’s the right choice ?

Let’s suppose I have a “article” content type with an Image fieldtype.

. If I create an article from the NG Admin UI:
–> the image file wil be stored in “./ezpublish_legacy/var/storage/images/”
–> the Platform UI will crash with an exception “Argument ‘BinaryFile::id’ is invalid”
–> the Frontoffice will crash with an exception “Argument ‘BinaryFile::id’ is invalid”

. If I create an article from the Platform UI:
–> the image file will be stored in “./ezpublish_legacy/var/site/storage/images/”

And I have found the following configurations:

in app/config/ezplatform.yml:

ezpublish:
    system:
        site_group:
            var_dir: var/site

in app/config/ngadminui.yml:

ezpublish:
    system:
        ngadminui:
            var_dir: var

I found the solution with setting the “var_dir” parameter value in ngadminui.yml, with the same value of “var_dir” in ezplatform.yml

var_dir: var/site in both files

–> image files are stored in “./ezpublish_legacy/var/site/storage/images/”, whatever the UI used (Platform or Netgen)
–> no more crash / exception.


#2

That indeed is not correct.

Both of those files should have “var/site” for “var_dir” configuration.

I will investigate why it happens and let you know.

Thanks for reporting it :slight_smile:


#3

@storton I’ve just released Netgen Admin UI 2.1.3 which fixed the issue you describe.

The problem was that installation procedure always used var dir and repository from the default scope, which is not configured in clean eZ Platform. I’ve now added a new question to the installer which asks for a name of siteaccess group to base the new config on.

Can you try it please and let me know if it works for you?

Thanks!


#4

Thank you very much @emodric !
Your Netgen Admin UI 2.1.3 release does exactly the job, “var_dir” parameter in both ngadminui.yml and ezplatform.yml match together. I don’t need anymore to modify manually one of these files.


#5

Good to hear that @storton !