Custom Craft CMS plug-in template changes issue - craftcms

Somebody has developed a custom plug-in for a project of mine.
I now want to change some templates from this plug-in and no matter what changes I make to these templates, nothing changes! I don’t understand why. I’ve cleaned caches several times and the cache tag is not used. It’s my third craft cms project but I’ve never had much experience with custom plug-ins.
What might be happening?

Have you tried composer commands for the same?
composer update
For updating the composer
If it doesn't work try uninstalling the plugin then install it again with the following commands
composer remove vendor/plugin-handle
For uninstalling the Plugin
composer require vendor/plugin-handle
Install the plugin again then activate the same through CP
Hope this helps you in the same.

Related

Is it possible to disable Sass in Rails 6?

I work in a completely air-gapped environment in which I would love to use Ruby on Rails. I have the ability to cache dependencies for offline use in Nexus. The problem I'm having is that after I've cached all my dependencies for Rails 6 (including the NodeJS ones), node-sass is unable to install because it attempts to download a file from GitHub.
I'm completely fine without using a CSS pre-processor, and would much rather deal with vanilla CSS than deal with this dependency headache. Is it possible to disable just Sass support when creating a new Rails app? I'm able to use --skip-javascript to disable all javascript support, but since all the other dependencies are able to be installed, it would be a shame to have to disable them just because node-sass can't be installed offline. Is there an option like that for Sass?
I'm aware I could manually copy the .node file from the GitHub release page, however, I'm trying to make this process as minimalistic and automatable as possible.
I'm working with Fedora Linux if that's relevant.
Any help is appreciated.
Yes, I think --skip-sprockets option will disable Sass. You can also disable webpacker using --skip-javascript.
You may try below command.
rails new green-forest -S -J

Is it possible to avoid updating drupal core with composer update?

I'm trying to build a docker container where the dockerfile installs a specific version of drupal, I copy over custom copies of composer.json/composer.lock and then do a composer update to download the contributed modules specified in these composer files. I know that ideally composer would also control core, but for this project, I'm trying to avoid that.
The problem I'm having is that composer update seems to also reinstall drupal, where I want the dockerfile to be in control of this and I'd like composer to just manage the modules.
Is this something I could do by modifying the composer files (so far tests have not worked)? It seems you can't specify a package for composer to ignore and where I see you can specify specific packages to update, that's not really a viable solution for this.
Thanks
OK, it's looking like the issue was the composer.lock/json files I was adding to run composer update were initially created by using composer create-project drupal-composer/drupal-project, which installed core and thus added it to the composer.lock/json files.
It seems that by just reinstalling the contributed modules with composer in a fresh drupal site (so simplified composer files) might be the answer.

Bower not copying any files

Im using bower as part of the yeoman 1.0 beta 4 install. All looks well however when I run bower install I get the expected output yet no files are copied to app/components as advertised.
I am running on windows which I understand is not officially supported yet. Has any one managed to get this up and running with some success? I have followed some tutorials on line relating to the subject however I think they are out dated. I managed to install yeoman without any additional steps and no errors as far as I can tell.
Grunt File being Used
Oh no... Git was not on the system path. Adding it caused me to run into another small error with a solution found here http://wingkaiwan.com/2012/11/25/bower-errors-on-windows/
Thank you Mr Ricky Wan

How to update plugins version (of a rails project) when old version had manual changes

How to update many plugins version when old plugin's version had manual changes in project?
Is there any tool available for doing this?
or tell proper method for updating ruby plugin version if some plugins may have manual changes done before in the older plugin's version.
Best method when a plugin is required or preferred *might be to copy out the old plugin to a dummy directory for reviewing later, then
uninstall the plugin, (script/plugin uninstall plugin_name)
install the old (but unmodified version) plugin (script/plugin install plugin_name_source_address) - likely either from rubyforge or github
review against the saved version you put in the dummy directory using an editor capable of differential display (that is, which allows you to compare two files for variations. Notepad++ is one freebie that will do this, but there are a ton of editors that allow diff views)
(this may or may not be something you can script. idk. I'm not that good, but I don't know of a tool that will do it all for you)
do another uninstall on the plugin to clear it out, since it's job is done,
install the new version of the plugin (script/plugin install plugin_name_source_address)
and finally edit the new plugin as necessary to accommodate any customization that was performed by you or some third party to the original utility.
I say as necessary because some of the customizations may not even be required in the newer version, although I can't say for sure...
finally, once all your patches are re-added to the new plugin and it's been tested and verified, either delete the dummy directory or archive it for future reference.
See, and I didn't even cop out with a bundler answer. You DID ask for assistance with a plugin, right? ;)
I'm not quite following you, but surely but that's what the Gemfile is for?
Take a look at Bundler
Try to run "$gem install rails"(it will install the newer version of rails) and then install watever the gem it asks finally run "$bundle install"

Looking for SVN Best Practices When Building Rails Applications on Ubuntu [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
First a bit of background.
I have been working on the MS platform for my entire development career. Up until 2 weeks ago, I had never booted any other OS than 98/XP/Vista. I started using VSS long long ago, and made the change to SVN about 2 years ago. With SVN I use TortiseSVN and use the standard branch/tag/trunk setup.
My projects are also self contained, meaning I can go to a fresh dev box, pull down a single repository, open VS, press F5 and it will run (most of the time). All dependencies are stored in a lib folder, source code is in a src folder, etc...
In an effort to learn new things, I've decided to build a Ruby on Rails application and have created a Ubuntu based development machine. I have a SVN server up and running and am working with another person on this project. He happens to be using a Mac for his development machine.
And now for the issues.
I seem to be struggling with how to manage the various versions of ruby, rails and all of the plugin's I'm working with. I also seem to be struggling with using SVN on Ubuntu.
So Ubuntu comes with Ruby pre-installed. I want to say it's version 1.8.5. Either way, I had a bunch of gems to install for the plugin I'm using (Community Engine). Being new to *nix, I didn't use sudo when installing them and ran into all sorts of issues. I ended up blowing away Ruby completely and starting fresh. That seemed to work.
The problem is though, that after I commit my code, and the other guy gets latest, he has to go through the whole process of installing gems.
What is the best practice for managing gems and plug-ins in a RoR application? I don't care if a zillion files get added to SVN. Diskspace and network bandwidth are cheap. I just don't know how to do this correctly.
So on to SVN.
I have installed RapidSVN, but very frequently run into issues with folders getting locked. A couple times I realized my mistake, others, I had no clue why. But in both scenarios, i couldn't fix it. I ended up making a backup of my code, pulling down a new working copy, then manually moving over changes and being a bit smarter when committing them to the project.
I actually RTFM a bit last night and found that I'm supposed to create a bookmark for my repos, then do a "checkout working copy" from that bookmark. I'm not sure why, but ok, that's what the manual says...
What are some best practices for using SVN on a RoR project on Ubuntu?
I'm literally looking for a step by step process on this one.
edit
I forgot to mention, I use NetBeans for my IDE, although i have not looked to see what kind of SVN support it has, if any. I looked at RubyMine, and would love to use it, but it appears to be too unstable right now.
For plugins, I'd personally recommend just sticking them in the vendor folder and add them to SVN as if you'd written the code yourself. Piston was also a great solution, but switched away from it when all the common plugins started moving to github (piston has been unreliable since then)
For gems, hopefully you're using rails 2 or higher. You should be listing the gems you require in your config/environment.rb using config.gem. Here's a bunch of information about that feature
What this means is that if you add a new gem, the next time your co-worker updates, his rails app won't boot until he's got the neccessary gems. He can then install them in one step using sudo rake gems:install
You can take this one step further, and put your gems in the vendor directory. This is commonly known as "vendor everything." The easiest way to do this is to list all the gems you use in environment.rb as above, and then run rake gems:unpack. There are 2 problems with this approach however, so I prefer not to use it myself.
If you have 10 apps and they each vendor their gems, you end up keeping 10 copies of common gems in subversion, which makes updating all your sites a whole lot slower.
This may not be an issue for you, or may be worth putting up with, it's just a personal preference.
Some gems (such as mongrel or hpricot) have native extensions written in C. What this means is that when you install them, the .c source code is downloaded, and gcc gets run to compile it specifically for your system.
If you installed a native C extension on ubuntu, then put it in the vendor folder, and later on tried to run that on OS X (or even possibly a different version of ubuntu) it would most likely crash your ruby process and bring your app down.
If all your gems are pure-ruby ones, then this is not a problem, but it's just something to be aware of.
Many people use piston or desert to manage plugins and install gems into Rail local vendor folder (stored under SVN).
http://www.rubyinside.com/advent2006/12-piston.html
http://pivotallabs.com/users/brian/blog/articles/459-build-your-own-rails-plugin-platform-with-desert
I also recommend using geminstaller which will help you both install all the same gems and the same versions of them
http://geminstaller.rubyforge.org/
I use SVN from the command line but if you were more comfortable with TortiseSVN you might want to try IDEs that have SVN nicely integrated like RadRails and NetBeans. The IDEs have very similar graphical SVN managers similar to Tortise, if you want to work on the cmd line just find a simple 10 minute SVN tutorial and you should be good to go.
I have never heard of rapid SVN and the normal SVN tool has always worked just find with me, hardly ever causing the locking folders issue.
Orion mentioned having to rebuild gems that have been vendored when sharing them between different OS's - you can use the gems:build rake task to rebuild them automatically.
First, figure out svn from the command line. The svn-book is on line. It's not too hard to do svn status or svn commit -m "blah". Most problems come if you use OS functions to delete or rename files. Use the svn commands for that.
Next, if rapidsvn is not working out for you, try svn-workbench. Hate to say it, but none of the linux svn GUI tools that I have seen are as good as tortoisesvn.
Plugins and svn are an issue. There is a tool called piston that aims to clear that up, though I don't use it. I check out the plugins into my vendor/plugins directory. If a new version comes out that I really want, I use my trusty update_plugin bash script to update the plugin:
#!/bin/bash
# reinstall the plugin in an svn friendly way
plugin="some_plugin"
plugin_url="http://some_server/some_plugin/trunk"
for f in site1 site2 site3
do
echo $f
cd ~/rails/$f
svn delete vendor/plugins/$plugin
rm -rf vendor/plugins/$plugin
svn -m "remove $plugin" commit
script/plugin install $plugin_url
svn add vendor/plugins/$plugin
svn -m "add $plugin" commit
done

Resources