Plone 4.2 custom theme administrator javascript not working - plone

I have problem with my plone site administration, when I apply my own template then the front end side customized as I want, but the administration part javascript and other functionality like drop down visual html editor is not working. Please any body help me to solve this problem
Version Overview
Plone 4.3 (4305)
CMF 2.2.7
Zope 2.13.19
Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2]
PIL 1.7.8 (Pillow)

If you are using Diazo, then you probably need to add this to the rules in rules.xml:
<before theme-children="/html/head" content="/html/head/script" />

Related

Is there a specific order in which you need to install VS extensions to enable IntelliSense, or how do you enable it?

A few days ago, I have installed Visual Studio Code for the first time onto my laptop. The version details are as follows:
Version: 1.19.2;
Commit: 490ef761b76b3f3b3832eff7a588aac891e5fe80;
Date: 2018-01-10T15:55:03:538Z; Shell: 1.7.9;
Rendered: 58.0.3029.110
Node: 7.90
Architecture: X64
I have also installed the following extensions as required for the project (Angular 5 front-end and ASP.NET Wed API Back-end) I am working on:
Angular Files 1.3.10 by Alexander Ivanichev
Angular Language Service 0.1.7 by Angular
Angular v5 Snippets 2.11.2 by John Papa
Auto Import 1.5.3 by steoates
Bracket Pair Colorizer 0.10.14 by CoenraadS
C# 1.13.1 by Microsoft
C# Extentions 1.3.0 by jchannon
Debugger for Chrome 4.0.0 by Microsoft
Material Icon Theme 3.2.1 by Philipp Kief
Nuget Package Manager 1.1.6 by jmrog
Path IntelliSense 1.4.2 by Christian Kohler
Pretier – Code formatter 1.1.2 by Esben Petersen
TSLint 1.0.24 by egamma
VScode-icons 7.19.0 by Roberto Huertas
All of these extensions are enabled, but there is no IntelliSense or auto-completion, and Quick Fix (Ctrl.) Does not work. Despite numerous attempts to uninstall/re-install VS and extentions I still can't get IntelliSense or auto-completion and Quick Fix to work. Without it I am really in the dark. This sucks.
Is there a specific order in which you need to install the VS extensions to enable IntelliSense, or how do you fix this problem? I want to use Visual Studio Code, but if it's not living up to expectation I need to consider other options. I do want to give VS a go.

Don't show language code for default language in URL of Django CMS site

When I set up a multilingual DjangoCMS powered website the default language code is appended to the URL:
http://mypage.com/ -> http://mypage.com/en
I don't want this to be the case for the default language (e.g. 'en') Instead what I want is the default language being chosen when there's no language identifier within the URL:
http://mypage.com -> Choose English
http://mypage.com/fr -> Choose French
http://mypage.com/it -> Choose Italian
How can this be done?
Versions:
Django CMS 3.0.3
Django 1.6.5
Python 2.7
I wrote this for a project that's currently using it in production, they use django-cms 2.4.3 but I don't see why it would not work on 3.0, all you need to do is create middleware.py file in one of your apps, say core and then replace django's locale middleware with the path to this one, since it's a subclass of it.
I faced a similar situation for a web site based Django CMS version 3.4.5 and Django version 1.8.18. At first sight this seems to be a Django CMS concern, but later I realized this is more related with core Django, which has been natively addressed by the recent versions of this project.
A working solution
The straightforward solution I applied involved these changes:
Upgrade to Django version 1.11.8 (any version >= 1.10 should work). A shell command like pip install Django==1.11.8 --upgrade can achieve this.
Edit the urls.py file to change it like the following:
Original content of urls.py file:
urlpatterns += i18n_patterns(
url(r'^admin/', include(admin.site.urls)), # NOQA
url(r'^', include('cms.urls')),
)
New content of urls.py file:
urlpatterns += i18n_patterns(
url(r'^admin/', include(admin.site.urls)), # NOQA
url(r'^', include('cms.urls')),
prefix_default_language=False
)
Apply Django migrations, which are part of the new version of Django
Run again the Django project and visually verify the new desired behavior
I should mention that someone with the nick FalseID at the #django-cms IRC channel gave me the advice to find this solution, as well as other related tips.
Other references
Existing answer that applies to a general Django project https://stackoverflow.com/a/43911714/6693126 if the version of Django is >= 1.10. This describes a similar situation to mine.
For Django versions < 1.10, this answer is useful: https://stackoverflow.com/a/17517000/6693126 which is based on the django-solid-i18n-urls package. I have not tested this procedure, but it should work.

Django CMS 2.4.3 installation - fresh instal does not work

I am new to python and django and I tried to install Django CMS 2.4.3. I work with python 2.7.6 and Django 1.6.
I did everything as I was told in documentation however "ImportError: No module named cms.plugins.text" occured after syncdb (when I delete cms.plugins.text from INSTALLED_APPS import error shows the last position from installed_apps e.g. cms.plugins.teaser).
Tried to google it and all I found was this: Django CMS fails to syncdb or migrate
Didn't help. Any idea what I do wrong?
This sounds like an error that is not caused by the django cms. Try to open python in the interactive mode and to import your plugin:
$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:07:21)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cms.plugins.text
This should not throw any error. If it does, the plugin is not installed or not on your PYTHONPATH.
Actually the name has changed from "cms.plugins.text" to "djangocms_text_ckeditor".

Failing to create a Plone theme templated from Sunburst theme

I have had problems getting a paster generated theme product to work in my production Plone 4.0 server, so I thought I would try again now that 4.1 is out. I'm now having a different problem: the theme just doesn't show up in the Add-ons list. Here's what I did:
Installed Plone 4.1 for Windows from Enfold
Downloaded ez_setup.py, and ran it with Plone's embedded python
Ran the installed easy_install to get the latest ZopeSkel installed into the embedded Python.
mkdir src ; cd src ; ..\python\Scripts\paster create -t plone3_theme plonetheme.lt
Answered the questions so that I'd get a theme based on the plone4 Sunburst theme
Otherwise I don't touch anything in that generated code.
cd plonetheme.lt ; ....\python\python.exe setup.py develop [not sure if I need to do this]
Edit the buildout.cfg to add plonetheme.lt to the eggs list, and added:
develop = src/plonetheme.lt
Run buildout. It mentions that it can find the plonetheme.lt package.
Start Zeo and Plone servers
The plonetheme.lt does not appear in the list of Add-ons
What can I have missed? I've poured over the bits of documentation on plone.org and I have Martin Aspeli's books. Many thanks. I've also tried adding the packaging to the zcml slugs, to no avail.
Luke
"cd plonetheme.lt ; ....\python\python.exe setup.py develop [not sure if I need to do this]"
no this is useless
"Edit the buildout.cfg to add plonetheme.lt to the eggs list, and added: develop = src/plonetheme.lt"
you need to add it to the zcml list too.
More info:
Take a look at the step 2 of this guide:
http://plone.org/documentation/kb/add-ons/installing
You could try the another solution using buildout.eggtractor
Or better if you paste your buildout somewhere...

Aptana customisation : PHP Syntax colours

I am rather fond of the Green Chaud set of colourisations for Aptana ( http://gueschla.com/labs/green-chaud./ ), however I notice that the PHP section of options is gone from the Aptana > Editors section of the preferences window.
Does anyone know how to colourise the PHP editor now that the option is gone to import a .col? I've had a poke in the preferences PHP > Appearance section, but no options to colourise in there. Am I doomed to stick with the plain colours?
PS. Aptana Studio, build: 2.0.4.1268158907 PDT Dev Tools 2.1.3v20090914
Old question, but I found this when searching today, and have just found the solution - maybe it will help others - currently I don't like the visual changes in Aptana 3 beta, but wanted to continue using the Aptana PHP plugin with Studio 2.0.
Anybody using Aptana 2.x can install Aptana PHP manually.... and you'll then be able to theme and import a .col file.
Help -> Install New Software
Add http://update.aptana.com/install/php as a source
Install the plugin.

Resources