How to ignore changes in WordPress cache files in Git? - wordpress

Every time I make a change to one of the WordPress theme files for my site there will be a lot of deleted cache files that automatically follow. Should I commit these changes using Git also or just ignore them? If the latter, what is the proper code I would use for this?
Thank you.

Well, I dont use wordpress, but if you are looking to ignore them you should have a file called .gitignore, and you are going to want to add those files (or if they are all in a folder, the folder) to the .gitignore file. https://github.com/DragonToothSoftware/SLang/blob/lexer-mod/.gitignore here is what mine looks like. It eliminates all of the cmake cache files

You should use a .gitignore file to exclude these files. They are auto-generated, so no need to keep them in repository

Related

Organizing assets in Symfony3

I still have some problems to handle my assets in symfony. The best practices say, I should store my assets in web/.
But I dont like to store my raw sass files there, because its a public folder and I think only compiled or static files should be stored there.
Thats why I store them (js and sass) currently in app/Resources. And my assetic.read_from is app/Resources. But then there are some bundles, that are symlinked by assets:install to web/bundles/.
And now, when I want to include this bundle-assets in my twig files, I have to go there by ../../web/bundles/.. in the stylesheets block. That doesnt look very clean, so I did a symlink app/Resources/bundles->web/bundles/ and that works.
But I still think its too much fiddle and I would like to know if there is a cleaner way that better collects my assets in one place.
Don't use AsseticBundle, it was even removed in default symfony-standard 2.8. Managing frontend assets with php is workaround for someone who really don't want to use "the right tools"
I personally keep my source files in /assets/ and with Grunt JS I compile them to /web/assets/ which later is served from assets.somedomain.com through CDN
2 years ago I wrote post about managing assets with symfony, it's still valid and up to date. You might want to check it out.
http://konradpodgorski.com/blog/2014/06/23/better-way-to-work-with-assets-in-symfony-2/
I should extend post by things I learned since then but always not enough time :)
I don't see why you can't use web/ folder for your assets.
I often work with less and other file format which are afterward processed and minified.
The solution to your problem seems simple to me: Use two folder in the web/ folder.
The first folder would be your source/ folder. In which you would place all your sass files. You will add a .htaccess file to this same folder, and deny all access (you can copy from the .htaccess file in the src/ folder).
Then a second folder, lets call it assets which will hold all your compiled and minified assets.
That should do the trick... ;)
You may be interested in this topic as well. It may help to hide futher the existence of your source/ folder. ;)
If you really don't want to have your sources files in the web/ folder, then loot at this, it should help you place your sources files in your bundle.

Keep CSS Formatting in folder assets Yii

I used yiibooster I have changed many styles under /assets/73dd67/bootstrap/css/bootstrap-min.css
But when I changed my webapp name, the CSS files not found, I mean the folder '73dd67' changed to '253ft6'.
The same case when I moved my webapp to another computer. The '73dd67' folder changed again in another name.
What can I do so I can keep the CSS formatting?
Thanks for your answers
Asset folder have only cached files. You made changes in cached file not actual file.
So find the actual location of bootstrap-min.css and do your changes. After doing changes, just remove all cache folders inside the asset folder. Then you can see the output in next refresh itself.
Hope you are using yIIbooster as extension. So do your changes in extension css/bootstrap-min.css file.

CVS Update - move away file

I am updating files in CVS. I put files that I needed to update in my unix folder.
Using cvs add, cvs commit - I was able to add new files to directory.
I was also able to update some from 1.1 to 1.2 using cvs update.
However I am unable to update the version for one file, getting this error:
cvs update filename.scr
cvs server: move away filename.scr; it is in the way
Any ideas how to solve this?
Do exactly what it says - remove filename.scr. CVS update won't overwrite the existing non-controlled copy of filename.scr.
in the cvs hidden sub folder check if the folder of that file is on the list of entries, if so you have to add it
To be specific, this means there's a file in the repository, and a matching file in your tree, but the file CVS/Entries doesn't mention it. That can fail either for the CVS/Entries file at the same level as the file it's complaining about, or if you do a recursive update, it can fail due to the directory not being listed in CVS/Entries at a higher level.
This happens often to me, and I don't know why; a perfectly good checkout starts to get these errors. If it is a missing directory, the easiest fix is to directly edit CVS/Entries, e.g. to add
D/Foo////
to Bar/CVS/Entries so that CVS knows it already owns Bar/Foo.
If it's missing a file, it's hard to regenerate the CVS/Entries line, so it's easiest to do as it says and delete the file.

moving a Drupal installation - what configuration changes required?

I would like to move a test Drupal installation from
/opt/lampp/htdocs/corporate/internet
to
/corporate/internet
What corresponding changes changes do I have to make in .htacess, settings.php and/or other settings?
That depends on that how your sites/ directory is set up. If you just have a default directory within, they you really should be good to go.
Mostly, you don't have to make changes. This is because Drupal installations tend to be set up to use relative paths that will be valid no matter where in the system it is. You may want to do a quick search of any custom code for the string /opt/lampp/htdocs to see if someone didn't do something relatively, but any other contrib code should work fine.
As Jubal mentions, sites set up in the sites directory may need renaming if you're going to be using a different URL to access the site - if you're moving from devel.site.com to www.site.com, and you have a sites/devel.site.com directory, then you're probably going to want to copy that directory to sites/www.site.com. On the other hand, if you're using sites/default for your site, or if you're not changing the url at all, then this isn't a problem.
Do note that the .htaccess in the root directory of Drupal is very important for Drupal to work, and that doing a simple cp -R of the directory will not copy the .htaccess, so make sure you copy that. (.htaccess files in sub-directories, like sites/default/files, will be fine, it's just this one in the root.)
And finally, check your file permissions after you move the files. You'll especially want to make sure that the file permissions for the files and tmp directories are correct so that people can properly upload files. (This may not be important - but it's something to check nonetheless.)

Drupal installing another language

I Downloaded the http://ftp.drupal.org/files/projects/nl-6.x-1.5.tar.gz file from Drupal Translations page. The readme file says to "Copy (merge) the content of this translation package into your Drupal installation root directory".
If i look at the package it has a few text files and a modules, profiles and themes folders. If I copy those in the root (so MAMP/sitename/) it overwrites a bunch of files (there are already modules and themes folders there ...) and whatever page I load on the site gives fatal errors.
Is it possible that on MAMP / Mac Unarchiver doesn't do copy/merge but actually Replaces the old modules folder with this new one?
What should happen, is that the relevant .po files are places in the folders where they should be. If things go wrong, what you'll end up having, would be a folder with all the .po's, in a nested set of folders.
In theory I guess it's possible to overwrite folders etc, but you would be opted to allow that first.
So you shouldn't be afraid that your entire Drupal install will be overwritten. You can just try to do the unpack and see what happens. Worst case, is that you'll need to place the files in the correct folders yourself.
I can't speak to Unarchiver, but if you're overwriting files then something's not behaving correctly. All the translation packs really do is add some additional files and folders (e.g. /modules/user/tranlsations/modules-user.nl.po to /modules/user).
My guess is that your whole /modules/user directory (along with all the others) is being replaced, rather than added to.
Have you tried merging the folders in Terminal? You should be able to merge these folders directly from tar. Comment back if you would like more detailed instructions on how to do that.

Resources