Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Forrest Chang
@fkchang
So looks like I'll need a bump to refinerycms-dragonfly to 1.0.2 to include this PR refinery/refinerycms#3452
so that I can actually override the before_serve for dragonfly
I see this one was accepted https://github.com/refinery/refinerycms/pull/3451/files but it's not on rubygems yet. Can we get that pushed?
Forrest Chang
@fkchang
Using the sha for now
Forrest Chang
@fkchang
jussihirvi
@jussihirvi
This place is so silent. Is there a better place to discuss refinerycms?
jussihirvi
@jussihirvi

In my refinerycms 4.0.3 app, a logged-in refinery user can always access his own user page. This is necessary for example if they want to change their password.

However, on the user page, any user can also control their own plugin access. This rrenders the whole plugin access selection meaningless. Has this been fixed in newer versions?

I made a temporary hack where only a superuser can see and select plugin access permissions.

Brice Sanchez
@bricesanchez

This place is so silent. Is there a better place to discuss refinerycms?

@jussihirvi Sadly, it's the place where there is the more discussions

However, on the user page, any user can also control their own plugin access. This rrenders the whole plugin access selection meaningless. Has this been fixed in newer versions?

Are you sure you're not a superuser?

Brice Sanchez
@bricesanchez

I made a temporary hack where only a superuser can see and select plugin access permissions.

Nice! Do you think you could provide a Pull Request?

Anita Graham
@anitagraham
Sorry, I lost my pinned gitter page.
Anita Graham
@anitagraham
Hi. I have a troubled relationship with Git. ( Downfall/Git rant. )
I have made changes to some refinerycms gems, and I want to upload them to my own forks, but not have those changes appear as a PR on the original gems.
I have had this happen unexpectedly in the past. My question is: how do I isolate my uploads to my fork of the gem?
Many thanks for all help.
Daniel
@Znow
Hi guys;
Upgrading an older application to newest refinerycms version 4.0.3. When accessing the "Files" tab in Refinery backend, I get the following error generated by refinerycms-resources: "ActionView::Template::Error at /refinery/resources
undefined method `new' for BigDecimal:Class". I can provide the full stacktrace. Have also searched and searched for anything that relates to this, but havent found anything. Would be so glad for another pair of eyes on this issue, thanks.
Daniel
@Znow
Finally found the isssue. Refinery-resources table and translation table, is not updated from using bigint to int, have to do migration manually to change this
Anita Graham
@anitagraham
@Znow I have done that, but not tested and scrutinized enough to do a PR. Will be coming one day.
Dalleau Théo
@Shirikumo
Hello, I followed the guide to create an extension and I don't have an entry point in admin. I use refinery 4 with rails 5.1.7. I checked the routes, they do exist but I can't find the page by typing the url directly. any idea to solve the problem ?
Anita Graham
@anitagraham
look at the output of rake routes > routes.txt (routes.txt)
Dalleau Théo
@Shirikumo
Thanks, routes were correct, finally got the answer. It was a permission missing to the user, got confused because the devise superuser role makes my refinery redirect by looping but worked well with refinery role and access on the user settings for the extension.
Daemmon
@dhughesbc
HI, Refinery newbie here. I just set up a new install on Rails 6, along with Solidus and solidus-refinery-authentication. It works great except for the fact that anyone can add/edit/delete pages, etc in Refinery. How do I force Refinery to authenticate users who want to edit things?
Anita Graham
@anitagraham
If you (as the admin superuser) look at the Users panel in refinery, you can give users access to different plugins. Pages is a plugin. Within Refinery permissions don't go any further than that.
Matt Bjornson
@mbjornson

I'm trying to install refinerycms-blog into an existing rails 6 app that uses devise, I'm getting the following error,

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    administrate-field-active_storage (~> 0.3.0) was resolved to 0.3.5, which depends on
      rails (>= 6.0) was resolved to 6.0.3.2, which depends on
        railties (= 6.0.3.2)

    refinerycms-blog was resolved to 4.0.0, which depends on
      responders (~> 2.0) was resolved to 2.0.2, which depends on
        railties (< 5, >= 4.2.0.alpha)

my gem file contains...

gem 'responders', '~> 2.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
gem 'refinerycms-authentication-devise', git: 'https://github.com/refinery/refinerycms-authentication-devise', branch: 'master'

I haven't seen anything in the closed issues...

Jan Jacobs
@jhjacobs81
am i the only one not getting refinerycms to work with a standard rails 6?
none of the "rails new app_name -m " work, the "refinerycms <sitename>" erorrs out...
Taylor Kems
@talitore
Hey all! How would I go about getting custom parts to work with refinerycms-blog extension? Either the config.default_parts or config.new_page_parts in the pages.rb initializer. My use case needs more than just 'Body' and 'Teaser'. Thanks!
Anita Graham
@anitagraham
@mbjornson I am using the branch 'features/rails5' with Rails 6. I do have some local changes for it which I shoudl do a PR for.
Anita Graham
@anitagraham

I have PR or two in the works, but I also have some problems that I don't know how to fix.

  1. refinerycms-wymeditor uses a call to find-asset which gets an error ActionView::Template::Error: undefined methodfind_asset' for #<Sprockets::Manifest:0x00007fd3fd15d0f0>`, which has been reported and fixed. However I still get the problem when testing.
    # Gemfile.lock
     refinerycms-wymeditor (2.2.0)
       refinerycms-core (>= 4.0.0, < 5.0)
  2. refinerycms-testing defines a helper refinery_login. However if I'm running tests in a gem such as refinerycms-inquiries, which uses refinerycms-testing I need to add refinery_login in a helper.

Any ideas for how to fix my basic setup?

P.S. These don't stop me using refinery, because I can fix them locally, but they do stop me submitting PRs.
Eliza Plowden
@elizaplowden
Hi all! I'm new to Refinery and am having issues with basic set up. I could not get the user sign in page (even after deleting the public/index.html file). I ran this command 'rails generate refinery:cms --fresh-installation' and migrated the db but am now getting an error message: 'cannot visit integer' whn i try to run the server. Any idea on what might have happened? I had to downgrade both bundler and sqlite3 to get even this far, so maybe something happened there?!
anitagraham
@anitagraham:perthchat.org
[m]

I find that installing a new refinerycms is a multi-step task. Once you have a basic installation up you need to update 1. Your Gemfile to ensure you are using the latest refinery gems from Github, and update your config/database.yml and build the database in the db of your choice.

```

anitagraham
@anitagraham:perthchat.org
[m]
I've put a couple of extracts from my Gemfile and database..yml into a gist. I will try to build a new refinery app from them and see how much more I need to do.
Anita Graham
@anitagraham
Gist is now updated, and fairly quickly gets to the point where refinery is running. I'm not sure I have the capability to make any changes which will fix the problems which stopped the install mid-stream, but I will try.
jussihirvi
@jussihirvi

I need to save and serve some images programmatically, and I don't want to mix them up with user-controlled images in Refinery::Images. Is it possible to create a custom resource type like :news_images which would use Refinery::Dragonfly datastore? Has anyone done that? I imagine this would involve creating a new config file, say config/initializers/refinery/news_images.rb, and cloning and adjusting files from the images folder of refinerycms gem.

Or alternatively I could use plain Dragonfly (without Refinery) and create a custom Dragonfly.app.

We have Refinery::Resources and Refinery::Images. But why only two? And The images cannot even be organized in folders (AFAIK). This file upload and organization system should be more versatile.

Anita Graham
@anitagraham
@jussihirvi Sorry I didn't see this earlier. I have used the technique you mention (separate models with a different Refinery::Images/dragonfly app) several times. Let me have a look...
Anita Graham
@anitagraham
# models/refinery/caststone/component
dragonfly_accessor :drawing, app: :caststone_components

and

# lib/refinery/caststone/components/configuration.rb
  config.dragonfly_name = :caststone_components
  config.dragonfly_url_format = '/system/refinery/drawings/:job/:basename.:ext'

The dragonfly_url_format has a different path from the standard image path.

Depending on your needs you could have a look at ActiveStorage. This is handy if you have users uploading files, and offers more storage options than just S3 and local.
Rails also now has the image_processing gem, which allows you to choose a different image handler (mini-magick or vips) and offers

Provides higher-level image processing helpers that are commonly needed when handling image uploads.
This gem can process images with either ImageMagick/GraphicsMagick or libvips libraries. ImageMagick is a good default choice, especially if you are migrating from another gem or library that uses ImageMagick. Libvips is a newer library that can process images very rapidly (often multiple times faster than ImageMagick).

jussihirvi
@jussihirvi

@anitagraham Thanks. I ended up using the same technique – plain dragonfly for my extra needs. I already have config/initializers/refinery/dragonfly.rb, and added another initializer, config/initializers/dragonfly.rb, which contains:

  if Rails.env.development? || Rails.env.test?
    datastore :file,
      root_path: Rails.root.join('public/system/dragonfly', Rails.env),
      server_root: Rails.root.join('public')
  else
    datastore :s3,
      bucket_name: ENV['S3_BUCKET'],
      region: ENV['S3_REGION'],
      access_key_id: ENV['S3_KEY'],
      secret_access_key: ENV['S3_SECRET'],
      url_scheme: 'https',
      root_path: 'newsmodules'
  end

And in my model, simply dragonfly_accessor :image

A field image_uid is required in the database, as indicated in the Dragonfly documentation. The S3 bucket has a folder newsmodules.

jussihirvi
@jussihirvi
@anitagraham Good to know about libvips. Maybe for the next project. I used ActiveStorage for one project for uploads by users. It was a little difficult to set up – I think there were not yet many tutorials, and the documentation was not thorough, IIRC. Once set up, it gave no problems.
Anita Graham
@anitagraham
Yes, I've added it to Refinery::Inquiries (my user needed her clients to submit plans and drawings), and in the end I used a js library 'uppy' - not directly in inquiries - to handle a lot of the user interaction.
jussihirvi
@jussihirvi

@anitagraham This is rather old, but anyway. You wrote "Hi. I have a troubled relationship with Git."

Isn't the basic technique to create a fork, say, "myownfork", and then git push github myownfork (assuming github)? And to the main repository of the gem, push master as usual.

Jason Corum
@jasoncorum
@bricesanchez - i'm working on an evaluation of using refinery as a headless cms and found your post from a few years back about it. it looks like there hasn't been work done on the refinerycms-api gem for awhile. would this be a viable path for us? or do you have any other recommendations for using refinery as a headless cms?
1 reply
ETHERUEMconsultant2018
@ETHERUEMconsultant2018
Hi Jesse we are so sorry to hear about your situation you can contact eth@consultant.com for any issue
Rahul Rajput
@starkdesk_twitter

Hello Everyone, I am working on one of the rails project where I have to upload some files to S3, using refinerycms (using dragonfly).
I am successfully able to connect to S3 with dragonfly. But we have almost 10K files in our local env( which was uploaded when app was being tested).
Now I need to copy these files to S3 (done, tried to make same path as local upload path of dragonfly).
Local path of dragonfly uploaded resources is like (public/refinery/images/2021/11/01/). But when I tried uploading files/images to S3 with path (2021/11/01/12/10/55/hash/ means with time as well).

I tried to change so many things from configurations file of dragonfly initialization mostly I tried changing (url_format but looks like nothing is working. )
Does anyone have Idea how to tackle this situation.
Thanks in Advance.

Javier Ortiz Arellano
@javoor1:matrix.org
[m]

Hello everyone!

I'm new at Refinery and I need to use Cloudinary for my Refinery project.

Do you have any idea how can I integrate Cloudinary instead of S3?

bhavesh8000
@bhavesh8000

Hello Team!

Can anyone help me to get RefineryCMS pages HTML content access in my rails application view pages

Basically we are creating HTML pages using refinery CMS and now wanted to display the content what we wrote in that CMS pages to our rails application view page

1 reply
jussihirvi
@jussihirvi

@bhavesh8000 You are most probably looking for this:

rake refinery:override view=refinery/pages/show

In the same way you can override these, and probably you must remove app/views/ from the beginning of the path, and .html.erb from the end:

app/views/refinery/_footer.html.erb
app/views/refinery/_head.html.erb
app/views/refinery/_header.html.erb

Here is a list of some (not all) things that you can override.

Anita Graham
@anitagraham
@bhavesh8000
I have responded to your comment on github, but this is probably a better place to help.
The answer to your question depends on how you want to access your CMS pages. Do you want to display them from a menu, or get their content and include it another part of your application? Do you need a list of links (i.e. a menu)
czepesch
@czepesch
Hello lovely people. Could someone point me to a guide how to deploy Refinery to DigitalOcean or\and Gleis.
I know there is a possibility to deploy to Heroku, but it is a bit pricey as far as I know.
Did anyone had experience with Refinery + DigitalOcean\Gleis or something else?
I have not tried it myself yet, probably it is possible and pretty straightforward, but I am a newbie and want insurance -.-
Anita Graham
@anitagraham
I have had Refinery on Digital Ocean. It was a couple of years ago now. As far as I remember it was straight forward, and much the same experience as setting it up on a local linux server.
czepesch
@czepesch
@anitagraham oh, great, thank you