smart-village-solutions / goldencobra Goto Github PK
View Code? Open in Web Editor NEWCMS based on modules as Rails 4 engines
License: Other
CMS based on modules as Rails 4 engines
License: Other
Goldencobra::Metatag
Password is too short
return
as a yes
Widgets have the functionality to be duplicated for faster creation of similar contents.
The connection to articles will not be duplicated when using this.
It would be nice to extend the duplication with the connected articles of a widget.
As a result, the user does not need to select the same articles afterwards.
Right now: If you create a menu item and give it a class "my-awesome-name", the Golden Cobra helper will render it as "my awesome name" => three separate classes.
To have one class name, you currently need to write it with underscores like this "my_awesome_name".
This should be changed.
There is this scope: https://github.com/ikuseiGmbH/Goldencobra/blob/master/app/models/goldencobra/article.rb#L126
scope :articletype, lambda{ |name| where(article_type: name)}
We need a second scope, that uses OR
for scoping.
paper_trail
is used in version 4.1.0
The current version is 5.0.0. There might be breaking changes. There are deprecation warnings, e.g.:
DEPRECATION WARNING: PaperTrail.track_associations has not been set. As of PaperTrail 5, it defaults to false. Tracking associations is an experimental feature so we recommend setting PaperTrail.config.track_associations = false in your config/initializers/paper_trail.rb . (called from block (3 levels) in <top (required)> at /Users/holger/projects/ikusei/goldencobra/basis-modul/test/dummy/spec/controllers/articles_controller_spec.rb:27
I asked for a CHANGELOG here: paper-trail-gem/paper_trail#814
edit: The changelog is here: https://github.com/airblade/paper_trail/blob/master/CHANGELOG.md#500-2016-05-02
active_model_serializers
is used in version 0.9.5
The newest version as of writing is 0.10.0
This version has a breaking change: app/serializers/goldencobra/article_serializer.rb:3:in
class:ArticleSerializer': undefined method root' for Goldencobra::ArticleSerializer:Class (NoMethodError)
Both gems should be upgraded, but only with testing and documenting the changes.
In Golden Cobra 2.0 an API for widgets is missing.
Like articles it is needed to ask for widgets and get their contents.
If you sort articles by GlobalSortingID there could be an error if an article returns nil instead of an integer.
According to Code Climate: https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::SessionsController
Like already possible in article index overview, users should also be able to activate and deactivate menu items without navigating in the edit view of an item.
With click on the icon in the table column "Active?" the method should be triggered.
Right now the user sees a 500 error page without a helpful error message.
One possible fix is to display a helpful error message.
The other solution might be that you don't see an option to delete an article like that in the first place.
Es soll sicher gestellt sein, dass alle Seiten immer die folgenden Meta-Tags enthalten. In () sind die Quellen in absteigender Reihenfolge angeben:
Der Redakteuer sollte in der Lage sein, alle Meta-Felder leer zu lassen und dennoch sinnvolle Metatags auf der Seite zu haben. Daher sollten die Meta-Tags auch NICHT beim Erzeugen des Artikels generiert werden (da sie sich sonst nicht verändern, wenn sich der Artikel ändert). Nur, wenn der Redakteur wirklich Einfluss nehmen will, sind die Meta-Felder relevant. Dieses Verhalten kann in Golden Cobra realisiert werden, da es universell gilt.
There are new (corner) cases for dealing with redirections:
Goldencobra::Article
) is not a descendant of the "startpage", the startpage is redirected but not the article itself. A possible fix would be the check for the root element.is there any way to disable the default dashboard gem?
no ssh access
bundle install
Fetching ssh://[email protected]:7999/GC/basis-modul.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Git error: command `git clone 'ssh://[email protected]:7999/GC/basis-modul.git' "~/.rvm/gems/ruby-1.9.3-p392@gcobra/cache/bundler/git/basis-modul-913d62e86df3450da41800763eac4ae920474437"
--bare --no-hardlinks` in directory ~/ruby/gcobra has failed.
We still use 0.13.1 in this project. This should be updated. The current version is v15.4.2
When editing an article with required fields the form forgets all new entries made after trying to save without successfully passing every validation.
It seems to redirect to the action instead of rendering again.
There is an idea to show the parent element (also) in the index view of the menues table.
The tree view shows the hierarchy of menues, but regarding the table view it is confusing when there are entries with same names.
So knowing the parent element makes it clear without struggling.
Golden Cobra has the ability to add geocoding features to Goldencobra::Article
s with belongs_to :location, class_name: Goldencobra::Location
.
Golden Cobra uses:
http://www.rubygeocoder.com
https://github.com/alexreisner/geocoder
There is a bug when Goldencobra::Article
s are saved or updated that an internal server error occurs, i.e. Geocoder::OverQueryLimitError
If a Goldencobra::Location
produces errors, the Goldencobra::Article
has to be saved or updated anyway.
SQLite3::ConstraintException: constraint failed: INSERT INTO "goldencobra_roles_users" ("user_id", "role_id") VALUES (1, 1)
When loading the Rails environment you always get notices like:
Default Articletype created for Consultant Index
Default Articletype created for Consultant Show
Default Articletype created for Contribution Index
Default Articletype created for Contribution Show
Default Articletype created for Default Index
Default Articletype created for Default Show
Default Articletype created for Event Index
Default Articletype created for Event Show
Default Articletype created for Experience Index
Default Articletype created for Experience Show
Default Articletype created for LegalText Index
Default Articletype created for LegalText Show
I don't find these very helpful or necessary. I would like to remove them. What do you think?
According to Code Climate: https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::Setting
The README is written for people who want to include Goldencobra as a gem inside their project. If you download it from Github and use it on it's own the README doesn't work for you. There are wrong steps:
The Readme might need an update. A review of the installation steps is necessary. If anything breaks or does not behave as expected a note should be made.
A nice idea for what should go into a README: http://rowanmanning.com/posts/writing-a-friendly-readme/?mc_cid=cbb4194c0e&mc_eid=d94d040c78
Handle php requests on article controller.
For example:
.../wp-login.php results in a NoMethodError (500 error).
NoMethodError: To respond to a custom format, register it as a MIME type first: http://guides.rubyonrails.org/action_controller_overview.html#restful-downloads. If you meant to respond to a variant like :tablet or :phone, not a custom format, be sure to nest your variant response within a format response: format.html { |html| html.tablet { ... } }
Currently unzipping zip files renames files iteratively and gives a fix file type .jpg
.
This was ok for a long time with simple images.
What is needed:
Where:
Errno::ENAMETOOLONG - File name too long @ rb_file_s_stat - /Users/holger/projects/ikusei/metropolis/tmp/cache/DA2/34C/articles%2F31%2F203%2F357%2F264%2F263%2F503%2F459%2F542%2F223%2F330%2F382%2F456%2F516%2F536%2F226%2F266%2F492%2F291%2F530%2F411%2F439%2F302%2F215%2F276%2F303%2F262%2F267%2F454%2F312%2F197%2F487%2F453%2F512%2F624%2F448%2F505%2F63/6%2F462%2F404%2F498%2F355%2F494%2F596%2F270%2F242%2F629%2F239%2F489%2F280%2F452%2F525%2F193%2F586%2F395%2F238%2F598%2F470%2F528%2F449%2F529%2F639%2F219%2F627%2F209%2F608%2F592%2F405%2F588%2F195%2F403%2F220%2F576%2F207%2F269%2F14/1%2F259%2F511%2F282%2F325%2F301%2F584%2F460%2F634%2F444%2F218%2F469%2F204%2F406%2F192%2F371%2F257%2F632%2F490%2F407%2F268%2F575%2F285%2F619%2F358%2F224%2F451%2F292%2F551%2F256%2F392%2F217%2F502%2F300%2F360%2F299%2F298%2F640%2F25/5%2F630%2F305%2F633%2F481%2F243%2F214%2F496%2F531%2F396%2F356%2F626%2F537%2F345%2F286%2F225%2F441%2F461%2F414%2F497%2F201%2F504%2F457%2F606%2F486%2F198%2F366%2F455%2F527%2F540%2F631%2F544%2F458%2F491%2F513%2F196%2F522%2F287%2F24/5%2F205%2F279%2F194%2F450%2F402%2F297%2F252%2F208%2F541%2F2017-01-23+16%3A11%3A09+%2B0100
This error is generated in https://github.com/ikuseiGmbH/Goldencobra/blob/master/admin/articles.rb#L388.
I don't yet know why it's so long as it's supposed to only contain numbers (ids and updated_at). We have to investigate.
Thise are the lines in question:
objects_for_cache_key = Goldencobra::Article.where(id: params[:root_id]).first.descendants.reorder(:url_name)
cache_key ||= ["articles", params[:root_id], objects_for_cache_key.map(&:id), objects_for_cache_key.maximum(:updated_at)]
[1] > Goldencobra::Article.where(id: 31).first.descendants.count
=> 159
For simpler choice of articles in select lists the use of articles :url_name
instead of :title
would be purposeful. Selecting a parents article can be difficult on :title
because titles can exist multiple times.
The :url_name
also is not unique. But with its ancestry the complete url path is unique. So depending on the url path the articles tree structure is more clear and easy to choose.
There are several places where it should be changed:
The order of Article Fields for the default Article Type or new Article Typs should be as follows:
Position | Sort-ID | Name | Klappbar | Status | Feld |
---|---|---|---|---|---|
1. Block | 0 | Configuration | Ja | Geschlossen | state |
1. Block | 0 | Configuration | Ja | Geschlossen | active |
1. Block | 0 | Configuration | Ja | Geschlossen | creator |
1. Block | 0 | Configuration | Ja | Geschlossen | breadcrumb |
1. Block | 0 | Configuration | Ja | Geschlossen | url_name |
1. Block | 0 | Configuration | Ja | Geschlossen | parent_id |
1. Block | 0 | Configuration | Ja | Geschlossen | global_sorting_id |
1. Block | 0 | Configuration | Ja | Geschlossen | active_since |
1. Block | 0 | Configuration | Ja | Geschlossen | tag_list |
1. Block | 10 | Content | Ja | Offen | title |
1. Block | 10 | Content | Ja | Offen | content |
1. Block | 10 | Content | Ja | Offen | teaser |
1. Block | 10 | Conten | Ja | Offen | weitere Felder je nach Artikeltyp |
1. Block | 20 | List-Options | Ja | Geschlossen | index__display.index_articles |
1. Block | 20 | List-Options | Ja | Geschlossen | index__arcticle_for_index_id |
1. Block | 20 | List-Options | Ja | Geschlossen | index__arcticle_descendants_depth |
1. Block | 20 | List-Options | Ja | Geschlossen | index__display_index_types |
1. Block | 20 | List-Options | Ja | Geschlossen | index__display_index_articletypes |
1. Block | 20 | List-Options | Ja | Geschlossen | index__index_of_articles_tagged_with |
1. Block | 20 | List-Options | Ja | Geschlossen | index__not_tagged_with |
1. Block | 20 | List-Options | Ja | Geschlossen | index__sorter_limit |
1. Block | 20 | List-Options | Ja | Geschlossen | index__sort_order |
1. Block | 20 | List-Options | Ja | Geschlossen | index__reverse_order |
Letzter Block | 100 | Media | Ja | Geschlossen | article_images |
Letzter Block | 110 | Widgets | Ja | Geschlossen | widgets |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | robots_no_index |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_title_tag |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_meta_description |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_open_graph_title |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_open_graph_description |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_open_graph_image |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | metatag_open_graph_url |
Letzter Block | 120 | Metadescriptons | Ja | Geschlossen | canonical_url |
The Goldencobra::Setting
class should save Vitastep
s with the changes to its values and authors.
According to Code Climate: https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::NavigationHelper
Right now we require 54 runtime dependencies for Goldencobra.
I am positive that this could be reduced by a lot.
s.add_dependency 'rails', '~> 4.2.5'
s.add_dependency 'jquery-rails'
s.add_dependency 'devise'
s.add_dependency 'devise-token_authenticatable'
s.add_dependency 'cancancan'
s.add_dependency 'activeadmin', '~> 1.0.0.pre1'
s.add_dependency 'remove_accents'
s.add_dependency 'sprockets'#, "2.12.4"
s.add_dependency "sprockets-rails"#, "2.3.3"
s.add_dependency "tilt"#, "1.4.1"
s.add_dependency 'compass-rails'#, "2.0.5"
s.add_dependency 'sass'
s.add_dependency 'sass-rails'
s.add_dependency 'compass'
s.add_dependency 'sidekiq'
s.add_dependency 'sinatra'
s.add_dependency 'omniauth'
s.add_dependency 'omniauth-openid'
s.add_dependency 'oa-oauth'
s.add_dependency 'oa-openid'
s.add_dependency 'cancan'
s.add_dependency 'ancestry'
s.add_dependency 'acts-as-taggable-on'
s.add_dependency 'meta-tags'
s.add_dependency 'paperclip'
s.add_dependency 'uglifier'
s.add_dependency 'exception_notification'
s.add_dependency 'liquid'
s.add_dependency 'rubyzip'
s.add_dependency 'geocoder'
s.add_dependency 'paper_trail'
s.add_dependency 'whenever'
s.add_dependency 'inherited_resources'
s.add_dependency 'geokit'
s.add_dependency 'json'
s.add_dependency 'i18n'
s.add_dependency 'i18n-active_record'
s.add_dependency 'pdfkit'
s.add_dependency 'wkhtmltopdf-binary'
s.add_dependency 'wicked_pdf'
s.add_dependency 'rmagick'
s.add_dependency 'iconv'
s.add_dependency 'rack-utf8_sanitizer' # handles invalid url encodings
s.add_dependency 'simple_enum'
s.add_dependency 'addressable'
s.add_dependency 'protected_attributes'
s.add_dependency 'active_model_serializers'
s.add_dependency 'actionpack-action_caching'
s.add_dependency 'react-rails', '~> 1.0'
s.add_dependency 'oj' # faster json rendering
s.add_dependency 'bootstrap-sass', '~> 3.3' # frontend template framework
s.add_dependency 'font-awesome-sass'
s.add_dependency 'autoprefixer-rails' # to provide easy automatic css prefixing
s.add_dependency 'responders', '~> 2.0'
Hat tip to Mike Perham for inspiration: http://www.mikeperham.com/2016/02/09/kill-your-dependencies/
CircleCI and TravisCI seem to have problems starting a build because of Solr.
Auto check depends on e. g. 80 line lengths, but we use 100 as default.
So Golden Cobra needs an adjustment per config file for houndci.
The feature with the PR #56 has bugs.
There is often missing the entry for created articles in the article_urls table.
The startpage does not render, if there is no / at the end in the article_urls table.
More tests needed.
The work is done on this branch: https://github.com/ikuseiGmbH/Goldencobra/tree/feature/GCZ-48-administrate-and-activeadmin
Golden Cobra has the ability to copy widgets (Goldencobra::Widget
) for faster creation. The content is duplicated and the widget gets an extended title.
The widget position is sidebar after copying.
The widget position should be copied also and not being resetted to sidebar.
The duplication feature is called here: https://github.com/ikuseiGmbH/Goldencobra/blob/master/admin/widgets.rb#L140
…and implemented here: https://github.com/ikuseiGmbH/Goldencobra/blob/master/app/models/goldencobra/widget.rb#L185
According to Code Climate: https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::Widget
Steps to get Rails 5 (edge):
git clone [email protected]:/rails/rails.git
cd rails
bundle install
./railties/exe/rails new --edge my_edge_app
cd my_edge_app
bundle install
As of October 30th it does not work with Rails 5 because Active Admin and Devise doen't run with Rails 5 (yet) activeadmin/activeadmin#4177 Rails 5)
This is the current version https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::Api::V2::ArticlesController
This code should be refactored.
According to Code Climate https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::ArticlesController
DEPRECATION WARNING:
[Devise] sign_in(:user, resource)
on controller tests is deprecated and will be removed from Devise.
Please use sign_in(resource, scope: :user)
instead.
(called from block (4 levels) in <top (required)> at /test/dummy/spec/controllers/articles_controller_spec.rb:55)
does not work. This is why:
In line 79, we try to match the request with existing redirector records, but only match with the given request-path, ignoring any url params. The existing redirector record does have a parameter at the end, though. So it cannot match.
Our current idea is, to expand the Goldencobra::Redirector
model with new url-parameter attributes. The matching would then again be done by the param-free url path, and additionally taking any given url-params into consideration.
related to #15
According to https://codeclimate.com/github/ikusei/Goldencobra/Goldencobra::Generators::InstallGenerator
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.