I have a Plone 4 site that was created 3 or 4 years ago and has had little maintenance since. A third party installed a theme that I was never happy with, but since nobody else seemed to care I didn't pay much attention. Now I've been hired to update the theme, and I see the real problem with the old site is that many of the standard .css files are not being included.
When I install the theme into a brand new Plone site, it looks good, but when I install it on the old site, member.css, for instance, is not loaded.
I can fix it by exporting the cssregistry.xml from portal_setup in the new site and loading it into the old site, but I'd rather find out why it's wrong as it is - what product should be installing member.css? It looks as if it should be Products.CMFPlone (from Plone-4.0.7 in my case), so how would I force it to reinstall its registry?
[Edit: In fact, I did force it to reinstall it's registry by going to portal_setup import and reimporting the "Stylesheet Registry" step. That broke my custom theme and some adapter (very odd, that), so I tried reimporting all steps and broke everything. Good thing this is just a test copy!]
If you have an old and migrated site, I would just go into the ZMI and manually fix the problems. member.css has been part of core Plone itself since the beginning. So if that's not enabled someone did a manual change to your old site.
It's much easier to just fix the one broken site via the ZMI than to write any code or profiles to do it.
In my opinion it only makes sense to write GenericSetup profiles, if you do it all the way. So no changes via the ZMI or Plone control panels are allowed. You always have an extension profile in your policy code that will create a new site exactly mirroring the live site. You write upgrade steps for your own changes and run those instead of reapplying any profiles. You make sure to only use add-ons that are well behaved and use upgrade steps or you fix those to behave correctly.
But all of that costs time which only makes sense if you expect to change your site continuously and have tests for your site specific configuration. If you produce one-off sites that won't change anymore after they are deployed, this whole overhead is probably not worth it.
If you had many tracebacks like
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module zope.browserresource.file, line 202, in GET
Module zope.component._api, line 109, in getMultiAdapter
ComponentLookupError: ((<Products.Five.metaclass.DirContainedFileResource17 object at 0xde678ec>,
<HTTPRequest, URL=http://127.0.0.1:8080/Plone/portal_css/Sunburst%20Theme/++resource++tinymce.stylesheets/tinymce.css>),
<InterfaceClass zope.browserresource.interfaces.IETag>, u'')
and after reimporting cssregistry.xml, had a broken layout with in the foreground Tracebacks looking like:
2011-10-10 08:42:32 ERROR Zope.SiteErrorLog 1318210952.260.0813518537427 http://127.0.0.1:8080/spirulinea/portal_css/Sunburst%20Theme/member.css
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.BaseRequest, line 516, in traverse
Module ZPublisher.HTTPResponse, line 727, in debugError
NotFound: Site Error
You may have fall in the same bug than me
as it is said on http://tech.groups.yahoo.com/group/zms-developers/message/3674
(for me as well) downgrading to http://download.zope.org/Zope2/index/2.13.2 was the key.
[nota : as the time, I did not encounter any problem with a fresh new Plone on the same instance of Zope, strangely enough .. so after all, may be your custom theme were not broken ]
Related
First a little context to the problem:
My work can be divided into two categories:
Maintaining ASP.NET Web forms legacy projects
Building new ASP.NET Core 2/3.1 projects
When maintaining the web forms legacy projects, I get often a Git error the last couple of months. The following error occurs when I try to stage/add parts of code through GitExtensions:
error: patch failed: [FileName].aspx.cs:[LineNumber]
error: [FileName].aspx.cs: patch does not apply
The message is added with some code where the actual patch fail occurs (see example later in this post).
As mentioned before, the error only occurs in the web forms projects and this is the only correlation I can find between the errors. It seems that the error occurs at random pieces of code in random files that I try to stage/add.
I use the following tools for source control:
The most recent version of Git (2.25.0)
The most recent version of Git Extensions (3.3.1.7897)
Repositories are hosted by Bitbucket and developing happens in the most recent version of Visual Studio Professional
I already tried the following to solve the error:
Re-cloned all of my projects
Reinstalled Git
Reinstalled Git Extensions
git: patch does not apply
Example
In the example I tried to stage line 91 and 92. Then the error occurs as can be seen in the left part of the image. But when I stage line 182, everything is fine
I already looked with some colleagues what the problem could be. They also never encountered it and don't know how to solve it.
Oh yeah, a little disclaimer. This is my first post on SO. Please let me know if I didn't provide information in a desired or sufficient way so I can improve upcoming posts.
Kind regards
EDIT
The problem seems Git Extension related. I just installed Source Tree and there everything works fine.
after install on module like nb store some sub module installed in dotnetnuke too, for unistaling installed module should click on recycle bin for each submodule to uninstall them and it's waste of time, how is it possible to do in easier way ?
There is not an easier way to handle this. If the module developer defined multiple definitions when they are added that is the way that it works.
once added, each module must be removed individually.
I'm trying to write a module that requires either module a or module b (not both, though having both is fine). It just dependent on a OR b. Is there a way to put this in the .info file or enforce this OR dependency programatically?
You can't natively in any current version of Drupal, there is a discussion here which talks about adding a enhances[] and enhancedby[] property for .info files (amongst a few other new properties), but it has not been put into core as far as I can tell.
If you're using Drupal 6 you might have a look at the Module Supports module which was created in response to that discussion.
If you're using Drupal 7 the discussion might get you half way there, and if not there are a few patches on that page that will at least show you roughly what you need to do to patch Drupal core yourself to do get it working.
The only way I've seen other modules implement this is by reporting problems after a module is installed and not including the modules as dependent. I would assume this would be similar to modules like ckeditor or jquery_ui which require non-drupal code to be put in place to operate properly.
I've been trying to wrap my head around module development for DotNetNuke for the past day and I keep running into roadblocks. Prior to this, being the *NIX/OSX grognard that I am, I have managed to create a Skin and a few Widgets "The Hard Way" by creating the manifest file myself with a python script, coding everything in Textmate and using a Makefile to create the packages anytime I update it, then installing it onto a remote development site on some shared hosting. However, I want to try things the "DotNetNuke way", so I've been looking around for instructions now that I've got a Windows VM up and running.
From what I've found, this is what you're actually supposed to do:
Create a local dotnetnuke website.
When the dotnetnuke website has been created, go to Host -> Extensions -> Create Extension
Select Module and fill out all the forms.
Open up the website in Visual Studio.
Find your module in the <site>/DesktopModules and start hacking away at it
When you want to redistribute your package, go to Host -> Extensions -> Edit Module -> Create Package.
There are a couple of problems with this, however. I get as far as step 5, and for some reason I can't seem to find my module in DesktopModules. I have tried looking elsewhere in the directory tree for my test module and I can't find it anywhere. In addition, when I try editing a package, I can't see any "Create Package" button.
Any ideas where I'm going wrong? I'm using the absolute latest DotNetNuke as of this writing (5.6.0), by the way.
Update: Okay, feeling a little foolish I first have to create the module in Visual Studio, then create the module in the website and attach it to the manifest of my module. However, when I do this, my site blows up because it seems to assume that I'm using a company name of "YourCompany". Fine. I revert, delete the module and try again but creating my module with a namespace of my company name doesn't seem to change any "YourCompany" names, they're still all over the created files. What in the heck is going on here?
You need to do a search and replace in the entire project as well as the settings in the Projects settings. Also here is a link that may help link
Have a look in the project/solution properties under application make sure root namespace is not YourCompany
When I was upgrding my webite from drupal 4.7 to 5.2, I am facing an issue -
Fatal error: Call to undefined function node_get_base() in ../question.module.
Can any one help me to solve it...
Thanks in advance
The root of your problem is that you have some code in the file question.module calling a deprecated function (node_get_base()). Drupal 5.2 does not implement anymore that function so you get the error...
I assume that the question.module you are using is this one, which does exist for Drupal 5 series. If I am right, then I suspect you have missed to follow the upgrade instructions for updating your site which state:
5) Disable all custom and contributed modules.
[..]
11) Ensure that the versions of all custom and contributed modules match the new Drupal version to which you have updated. For a major update, such as from 5.x to 6.x, modules from previous versions will not be compatible and updated versions will be required.
12) Re-enable custom and contributed modules and re-run update.php to update custom and contributed database tables.
These instructions are in the UPGRADE.txt file in the Drupal root folder.
Hope this helps!
When upgrading Drupal to a new release, you more or less in some respects have to build the site over again. The thing is, that because the Drupal API changes to much in the new releases, each module will need to be replaced with a new one. In most cases this is just a matter of downloading a new version of the module and running update.php.
You should, however, go through each of your modules and find out what's needed to make the upgrade. Sometimes the upgrade path can be a bit tricky and you need a few attempts to get it right without corrupting any data in the process.
Another thing is, that when upgrading, going for the drupal 5 version of the same module might not always be the best choice. Especially when talking about Drupal 5, there are a lot of more or less unmaintained modules. So the best choice might be to find a different module that can do what you want, or even fulfill more of your needs.
It's always a hard decision and your theme will also need to be upgraded to Drupal 5. In short there is a lot of work evolved when doing a major upgrade. Most of it, is making some good choices about, which modules to use and how to migrate your data.
All that aside, following the upgrade guide in UPGRADE.txt like mac suggests is a very good place to start, and doing all of this leg work, would probably have avoided all this.