I wrote drupal plugin, that compatible with drupal6 and drupal7. Is there any way to share it as one plugin?
in *.info file there is core = 7.x or core = 6.x. May be I can set smth like core = 6.x, 7.x?
Unfortunately you can't do that.
You'll have to duplicate the module files with different .info file.
Related
I'm developing a website on Drupal 10 and I need the module Twig Tweak to be installed and working in order to use drupal_entity() in templates.
I copy-pasted the module from the /modules directory of another website powered by Drupal 8.9 and changed the line core: 8.x in the twig_tweak.info.yml file to core_version_requirement: ^10
But when I run the new website powered by Drupal 10 on the browser I receive the error
Class "Drupal\twig_tweak\Twig_Extension" not found in include() ...
This error is not thrown on Drupal 8 and 9 - only in Drupal 10.
How to resolve the issue?
The version of the module you are using is incompatible with Drupal 10. Some methods get deprecated, so the core compatibility strategy (update only the yml files) will not work for all cases.
You should download the module via composer
composer require drupal/twig_tweak
This is the recommended way to work with contrib modules. If you have any custom code on it, you should patch it.
Here is some info about patches
https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal/working-with-patches/making-a-patch
If somehow you can't use composer, try to download it from the module page. And check the core compatibility.
https://www.drupal.org/project/twig_tweak
I worked on the following Drupal versions,
Drupal 7.5
Drupal 8.2
While working on Drupal 7.5, I never faced a problem while installing the following modules,
Form Module
Poll Module
Pane Module
But, now when I have started a new website on localhost with Drupal 8.2, the following modules are showing issues while trying to install. Maybe the issue is because these modules aren't compatible/ updated with the new Drupal 8.2. These modules are now showing the following error while uploading and trying to install in Drupal 8.2,
"module name".zip or tar.gz does not contain any .info.yml files"
What we can do in that case? I want the above modules to work in Drupal 8.2 as well.
which form module did you try? drupal 8 core provides the contact form. you dont need a module for this. (https://www.drupal.org/docs/8/core/modules/contact/overview)
the poll module has a drupal 8 port. are you sure you downloaded the latest version for drupal 8? (https://www.drupal.org/project/poll)
and finally the pane module is depricated in drupal 8. i think there comes your error because in the pane module is no module.info.yml.
you should try the panels module for drupal 8. (https://www.drupal.org/project/panels) or if you want to write modules yourself read something like here (https://www.drupal.org/docs/8/creating-custom-modules). its a bit more difficult because of the OOP, controller and routing.
I am having only the sites folder(except Default Directory) and DB of a website with that how can i find my version.
ACtually in my DB they had fixed the prefix 'd6_' with that i can find it as Drupal6. But i can't find the correct Version of Drupal6.
In the info column of your system table in drupal database you can find the serialize text something like ""package";s:4:"Core";s:7:"version";s:4:"7.43";s:4:"core";s:3:"7.x";" of any core modules like aggrigator or block.
when you un-serialize the string you can find the version of drupal
e.g
[version] => 7.43
[core] => 7.x
This is the drupal version 7.43
Thanks
I don't think that version is stored somewhere in database, but in files you obviously don't have.
My suggestion is to check versions of all your modules (dir /sites/modules). Every module have version and possible date stored in it's info file. So make a list of release dates of all modules and then find out what was the drupal 6 version at the time your latest module was released and use that version of drupal.
I want create once module multi languages in drupal 7.x with i18n installed already.
Please help me step by step create that,
Thanks advance,
The home for all Drupal localization is now http://localize.drupal.org/. This is a good place to start reading about internationalization and translation.
As a developer, you should also look at the Drupal 7 i18n articles by kristen: http://www.kristen.org/drupal7-i18n-articles,
Also read this about .po files: http://drupal.org/node/1814954
The very short version of what you need to know as a developer :-) is that you should wrap the strings you want to translatable in the translate (t()) function, as shown here: http://hojtsy.hu/blog/2011-jan-25/drupal-7039s-new-multilingual-systems-part-3-localization-and-language-apis, and then translate the strings into the languages you're interested in by one of the means described below:
If you're translatable strings are part of an official Drupal project, translations contributed to http://localize.drupal.org/ will show up on your site next time translations are updated (there seems to be some delay of max 24 hours from a translation is accepted at http://localize.drupal.org/ to when updating has an effect). Updating can be configured to happen automatically with localization update: http://drupal.org/project/l10n_update
For custom modules, you can upload your own translations through the administrative interface of the same module (localization update).
Plone 4 contains a new folder implementation (in the plone.app.folder package) which is much more efficient for folders with many items. Is it possible to upgrade a Plone 3 site to use this folder implementation without doing a full upgrade of the site to Plone 4?
If so, what steps are required to do so? Any caveats I should be aware of?
I just tested a Plone 3.3.5 site with plone.app.folder==1.0.3 (newer version depends on Products.CMFPlone, i.e. Plone 4).
Extend a Plone 3 buildout with this one:
[buildout]
extends =
your-plone3-buildout.cfg
eggs +=
plone.app.folder==1.0.3
[instance]
zcml +=
plone.app.folder
zcml slug is important because plone.app.folder doesn't use z3c.autoinclude.
After running buildout and launching your instance, install the products as a regular Plone product and migrate existing folder by opening this URL:
http://localhost:8080/plone/##migrate-btrees
You'll get an output like this one:
2011/03/03-17:24:31 migrating btree-based folders from <PloneSite at /plone>:
2011/03/03-17:24:32 intermediate commit (0 objects processed, last batch in 0.289s)...
2011/03/03-17:24:32 processed 0 object(s) in 0.289s (0.290s cpu time).
Hope this helps
We used the Plone 4 folders in a Plone 3 site when they were under development, but i don't know if recent development for them have made them depend on other parts of Plone 4.
We still have them running in Plone 3 sites in production, so it is possible.
Not a clue. But Plone 3 has a "Large Folder" which also is based on BTrees and handles large folders well. It's not as slick though. I would use that one under Plone 3, I like to keep my Plone sites as standard as is humanly possible. :-)