How to find out which version of Silverstripe a site is using, looking at the source code? - version

I have been given a Silverstripe site to maintain. How do I know which version of Silverstripe it's using, by looking in the source code?

If your SS installation was made through composer you can have a look to composer.json in the root directory.
If it's a 3.x.x version you can also leave the mouse on the SS logo in backend (upper left corner) and the anchor title wil show you the version. Maybe it works also for 2.x.x versions, but I'm not sure.

The Depreciation class provides the version.
$version = Deprecation::dump_settings()['version'];
There is a function in the LeftAndMain class called CMSVersion. This is the function which is used to fill in the version information in the title attribute on the ss logo in the cms as mentioned in the accepted answer. This function attempts to get the version information from the composer.lock file. It will fallback to the /framework/silverstripe_version and /cms/silverstripe_version files if the composer.lock file doesn't exist. So to find the version in the source code, look in composer.lock, then /framework/silverstripe_version and /cms/silverstripe_version

In the folder "framework" is a file "silverstripe_version" with the Silverstripe version.

Inside the Folder Framework there is a README.md file. Inside that you'll finde the Version Number.
Also inside framework Folder there is _config.php, there you have a variable like Deprecation::notification_version('3.1.0'); In this example, Version 3.1.0

Related

how use ckeditor full version in react component

I'm using the react-ckeditor in project this is load ok.
but I need to use ckeditor full version as editor in the page
how could I use react-ckeditor full version not the standard version?
From the documentation:
By default, the CKEditor 4 React component loads the standard preset of the latest CKEditor 4 release from the CDN when creating the first editor. This behavior can be altered by changing the value of the CKEditor.editorUrl variable to point to the desired CKEditor script location:
CKEditor.editorUrl = 'https://your-website.example/ckeditor/ckeditor.js';
A zip file can be downloaded from https://ckeditor.com/ckeditor-4/download/ and upzipped inside your source code (e.g. inside public/ckeditor-4 folder if using create-react app).
I was also facing the same issue as I wanted to include all the available options in my toolbar. Turns out all you need to do is mention the type of distribution in your CDN link as full-all, to include full preset together with all other plugins created by CKSource.
I changed it from standard to full-all in my CDN link as given below-
<script src="https://cdn.ckeditor.com/4.16.0/full-all/ckeditor.js"></script>
Also, check the version. This is my source of info: https://cdn.ckeditor.com/
Hope this helps :)

Blogdown theming not being picked up by github

I have followed instruction from blogdown to get a GitHub static blog using markdown. However, a particular theme is not playing nice with it. The following MWE results in a unthemed blog:
blogdown::new_site()
file.create(".nojekyll")
blogdown::install_theme("lambdafu/hugo-finite")
Then editing the config.toml file to reflect my github.io domain.
Finally,:
blogdown::build_site()
cd public
git init
git remote add origin https://github.com/lf-araujo/lf-araujo.github.io
Unfortunately these steps causes the creation of an unthemed website, see here. I suspect it has to do with the custom theme.
Does anyone suggest a way of debugging this error?
P.S.: blogdown::serve_site() generates a correctly themed preview.
Judging from your HTML output files (e.g. index.html), you misconfigured your baseURL in config.toml. It should be https://lf-araujo.github.io/ instead of http://github.com/lf-araujo.github.io. The baseURL option is documented in Section 2.2 of the blogdown book.

team work with codename one

i am a student and i am a member of a group of five...
We have to work in the same project using git and we are using Scrum method in our work, so , we need some guide and best practice and answers before starting...we will be so happy with your informations.
can we use différent IDE (intellij and Netbeans)... if yes, the .gitinore file will contains every IDE 's specefic .gitignore file?
You can use this to get started: https://www.codenameone.com/blog/tip-using-git-for-codename-one-projects.html
e.g. sample gitignore from https://github.com/codenameone/MaterialScreensUIKit
*.jar
nbproject/private/
build/
nbbuild/
dist/
lib/CodenameOne_SRC.zip
psds/.DS_Store
.DS_Store
In your theme editor make sure the File -> XML Team Mode is checked for everyone so you can work on XML and individual files rather than the whole thing.
Alternatively you can avoid the designer tool altogether and use CSS.

CakePHP searching for DebugKit at wrong path

I am trying to import DebugKit and CakePHP is producing the following error: DebugKit.ToolbarComponent could not be found.
Right below it, it says:
Create the class ToolbarComponent below in file:
/Users/SomeUser/Sites/SomeProject/app/Plugin/DebugKit//Controller/Component/ToolbarComponent.php
If you notice though, there are two slashes between DebugKit and Controller for some reason, and that's obviously not a real directory. The server running PHP 5.4.17. I have followed the exact installation instructions listed here. Any suggestions?
I had the same problem and solved it by changing the permissions to 755 to folders within DebugKit.
When I encountered this problem, I realized I had a Plugin/DebugKit folder structure in my project's root, and under the app directory. The one under app was empty, save for a blank file called empty. Strange. I have no idea how this happened. (Perhaps from accidentally running composer as non-root?) I deleted app/Plugin/DebugKit, and moved the one from the project root into app. No more error.
DebugKit does not currently seem to be compatible with cakephp 3.0 even though it is the example in the documentation.
The latest version still seems to use the 2.x methods.
I will also submit a ticket regarding this to update their documentation to prevent confusion.
If there is something I missed regarding this issue and it is actually possible to install this, let me know.

How to prevent Joomla site creating unwanted folder

I have a menu link with the alias "inside" on a joomla 3.1.5 site here: http://naiwellness.com
Every morning I check the site and a folder named "inside" has been created in the root dir which prevents the site from loading as it should, instead displaying a directory contents listing at http://naiwellness.com/inside
Anyone have any ideas how to prevent this please?
Thanks
This is just a theory, but check the xml files of your installed modules and plugins (most likely a plugin) for this line...
<folder>inside</folder>
and if it exists try deleting that line of code - or better still uninstall the extension - that should fix it. It's possible that a plugin requires that folder and has php code to create the folder if it doesn't exist - and so creates the folder each time it is run - i.e. when the site is loaded. The above line of xml code I have asked you to look for will go someway to helping determine if this is the case.

Resources