Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$prefix is empty when retrieving PREFIX from settings #3

Open
pascalbayer opened this issue Oct 3, 2014 · 3 comments
Open

$prefix is empty when retrieving PREFIX from settings #3

pascalbayer opened this issue Oct 3, 2014 · 3 comments

Comments

@pascalbayer
Copy link

Problem

Description: When retrieving prefix from db it is empty, therefore

if (!($accessKey && $secretKey && $bucket && $prefix))
      return;

returns and does not upload any files to the S3 bucket.

Magento version: 1.9.0.1

Hotfix

Place prefix on default config level:

<prefix translate="label">
    <label>Website Prefix</label>
    <frontend_type>text</frontend_type>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
    <sort_order>4</sort_order>
</prefix>
@anatolykazantsev
Copy link
Contributor

Prefix is per-website scope. You can switch to default website scope and set its value.
Thought it's unclear and redundant in single-store configurations.

Note: in the proposed fix you removed prefix field from website scope - it's incorrect because purport of prefix field is to allow putting images from different websites (stores) to separate "subdirectories" on S3

@rimutaka
Copy link
Member

rimutaka commented Oct 4, 2014

Anatoly, can we run without the prefix and place everything in the root of the bucket for single store configs?

@anatolykazantsev
Copy link
Contributor

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants