Fede Barriola
08/09/2022, 7:06 PMKurtis
08/10/2022, 6:34 AMKurtis
08/10/2022, 6:34 AMKurtis
08/10/2022, 6:35 AMKurtis
08/10/2022, 7:15 AMconfig.image_attachment_module = 'Spree::Image::PaperclipAttachment'
config.taxon_attachment_module = 'Spree::Taxon::PaperclipAttachment'
As I am moving from 2.11 to 3.0?Kurtis
08/10/2022, 7:16 AMprocessed' for nil:NilClass):
so any help appreciatedKurtis
08/10/2022, 7:31 AMhas_one_attached' for #<Class:0x0000556c9d23c800>
when trying to deploy with:
if Rails.env.production?
attachment_config = {
s3_credentials: {
bucket: ENV["S3_BUCKET_NAME"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"]
},
storage: :s3,
s3_headers: { "Cache-Control" => "max-age=31557600" },
s3_protocol: "https",
s3_region: ENV["AWS_REGION"],
bucket: ENV["S3_BUCKET_NAME"],
url: ":s3_domain_url",
styles: {
mini: "128x128>",
small: "256x256>",
product: "512x512>",
large: "1024x1024>"
},
path: "/:class/:id/:style/:basename.:extension",
default_url: "noimage/:style.png",
default_style: "product",
}
attachment_config.each do |key, value|
Spree::Image.attachment_definitions[:attachment][key.to_sym] = value
end
end
Kurtis
08/10/2022, 7:47 AMKurtis
08/10/2022, 9:13 AMActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: 'Spree::Gateway::KlarnaCredit'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Spree::PaymentMethod.inheritance_column to use another column for that information.)
Kurtis
08/10/2022, 9:14 AMKurtis
08/10/2022, 9:14 AMKurtis
08/10/2022, 9:14 AMKurtis
08/10/2022, 11:11 AMkt-paperclip
+ image_processing
to Gemfile
• Adding config.image_attachment_module = 'Spree::Image::ActiveStorageAttachment'
and config.taxon_attachment_module = 'Spree::Taxon::ActiveStorageAttachment'
to spree.rb as per https://guides.solidus.io/developers/products-and-variants/product-images
• Adding + removing the attachment_config
as per for aws.rb https://github.com/solidusio/solidus/wiki/Storing-images-on-S3-and-CDN's
• Tried this alternative version https://gist.github.com/ArunMichaelDsouza/00029719b65028ab7e1a
Am I missing something? Upgrading from 2.11 to 3.1waiting_for_dev
08/10/2022, 11:13 AMKurtis
08/10/2022, 11:14 AMKurtis
08/10/2022, 11:17 AMKurtis
08/10/2022, 11:17 AMTom Wilson
08/10/2022, 9:49 PM/admin/search/products
to issue a search for these products, and that is returning an auth failure for this user. Because I'm a super user, it allows me to proceed. But after much digging, I still can't quite wrap my head around what permissions I need to actually grant this user to enable this use case.
It looks like the permission check is coming from the authorize_admin
method of the BaseController. That method looks like the following:
def authorize_admin
if respond_to?(:model_class, true) && model_class
record = model_class
else
record = controller_name.to_sym
end
authorize! :admin, record
authorize! action, record
end
In my case after tracing this, record
is product
and action
is search
- and the authorize! :admin
line is failing. The user has the ProductMangement permission set, though, which grants :manage SpreeProduct
. So what additional permission do I need to grant this user to perform a product search?tvdeyen
Module.module_eval
into Module#prepend
. So they work with the new zeitwerk auto loader.
[Due to a "bug" in Ruby 2.7](https://github.com/jruby/jruby/issues/6445#issuecomment-894407106) prepended modules of modules included in classes do not get prepended to the class, leading to not overwritten methods as one would expect using Module#prepend
with modules prepended into classes.
I have several ideas to circumvent the issue
1. Prepend the module into the class the module that the monkey patch was meant for.
Problem with this is that the module in question (Spree::Core::ControllerHelpers::Order
) is included in several controllers and I would like to not maintain a list of controllers that I need to prepend my module in to.
2. Use module_eval
in the prepended
hook.
Just an idea I have, that I have not tried yet.
3. Trick Zeitwerk by adding the constant it expects from the file name and keep the existing module_eval
Feels fishy
4. Use a folder that is excluded from Zeitwerk auto loading.
Not very convenient during development locally.
Has anybody run into these kind of issues before and solved it? If yes, how?Georg Keferböck
08/11/2022, 6:41 PMActionView::Template::Error (undefined method 'subscribable' for #<Spree::Variant:0x00007feec5b059d0>): 106: <div data-hook="admin_product_form_subscribable"> 107: <%= f.field_container :subscribable do %> 108: <label> 109: <%= f.check_box :subscribable %> 110: <%= Spree::Product.human_attribute_name(:subscribable) %> 111: </label> 112: <% end %>
No idea where this is coming from? What do we have to do - step by step to remove the gem?Georg Keferböck
08/11/2022, 6:42 PMGeorg Keferböck
08/11/2022, 6:42 PMJared Norman
Jared Norman
subscribable
? In the gem?Jared Norman
bundle
to update the Gemfile.lock?Kurtis
08/12/2022, 10:54 AMPayee(s) passed in transaction does not match expected merchant id. Please ensure you are passing merchant-id=UAQHKSDFIT or <mailto:merchant-id-kasdgjgsdgsd@personal.example.com|merchant-id-kasdgjgsdgsd@personal.example.com> to the sdk url.
Kurtis
08/12/2022, 10:54 AMWladjmir
08/13/2022, 1:26 PMNitin
08/15/2022, 4:38 AMJay
08/15/2022, 6:51 AMuninitialized constant Spree::UserSessionsController
and
uninitialized constant Spree::Admin::UserSessionsController
Thank you guys any help would go along way. NOTE: I have tried to reinstall solidus_auth_devise gem.And still nothing. Regards