How to install extensions in contao 4.4 - content-management-system

I installed contao 4.4 in my localhost successfully.After successful installation I tried to install an extension via contao manager.Unfortunately it fails with console error.So I download zip file of extenson from codefog
and put it in the folder root/system/modules .But the extension is not found in backend.I think the extension is not installed successfully. How to make it works? Please help me.

This is how i install extensions in my contao 4 standard-edition. As commented, this only applies to the standard-edition, not the managed-edition. If you don't want to change to the standard-edition, you may better wait, until they fix the problem in the contao manager... Otherwise this is how it works:
Installing a Contao 4 bundle
Info: A bundle is the best thing you can find for extending contao.
It is the cleanest way of adding functionality to the contao cms.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require ... command for this extension
composer require madeyourday/contao-rocksolid-columns
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our bundle to the list of bundles, that contao should load: (the bundle name used in this line can be found in vendor/%developer%/%extension%/src/ and then there is a ...Bundle... php File there, that tells you the name of the bundle)
new MadeYourDay\RockSolidColumns\RockSolidColumnsBundle(),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 4 extension
Info: A contao 4 extension is defined by it's developer, it is actually still the same method of programming like in 3.5 but someone has tested it in contao 4 and approved of its functionality. This is the second best thing you can find for extending contao.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require command for this extension
composer require heimrichhannot/dlh_googlemaps
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('dlh_googlemaps', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 3.5 extension
Info: A contao 3.5 extension is your last hope, it is the same code as in contao 3.5 may or may not work - you have to test it yourself.
Find the module on github (or some other repo)
Conntect to your hosting with ssh (or if local, just open cmd or terminal)
Change into "system/modules"
Download the repo (e.g. git clone https://github.com/ContaoBlackForest/contao-system-notification system-notification) - notice the added "system-notification" at the end, that should be the foldername, in which the extions has to be (you can find the folder in the composer.json file inside the extension under "Resources/contao")
Create syslinks (bin/console contao:symlinks)
Add the module to AppKernel (File: app/AppKernel.php)
This line should be added once, just after "use Symfony\Component\HttpKernel\Kernel;" (this only has to be added once and only if you are using contao 3.5 extensions)
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('system-notification', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Your Question
To awnser your question, as the module you want to install, is a contao 4 extension, you could use the according instructions from above.
contao 4 extension - https://packagist.org/packages/codefog/contao-news_categories

You do not need to install this extension manually. Simply run
composer require codefog/contao-news_categories
in the root folder of your Contao installation. Depending on how you installed composer the command might be different.

Related

Private Repository Composer json Confused

I need to create a Private Composer Repository - it has 300 zipped extensions. which I want to install on Magento 2 site.
Each zipped extension file inside has its own composer.json file. as some extensions rely on other extensions to be installed aswell in order for them to work.
However when I try to run composer update it is looking for composer.json in the main directory url
Is there any way I can create a simple composer.json to direct it to look for the composer.json of the extensions I want to install inside the different extensions zipped files.
I have spent 2 days looking for tutorial or help on this but its very confusing for me.
tried to get composer to look inside the zipped folders
I just created a new private reposotory and uploaded all the zipped extensions to there - Do I have to do anything futher or is that it?
do I need to convert it to package - very confused
I manage to create the composer.json file
However if I try to run composer update it is giving errors like
- Root composer.json requires extcrea/extension == 1.13.5.0, found extcrea/extension[1.13.5] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
I tried to change the urls of the extensions inside composer.lock file to the new private repo
then run
composer update --lock
which is suppose to sync to new repository but I get same error again - how do I tell it to look for extensions in the new repository
tried deleting the composer.lock file but getting extension not found error
tried these aswell
composer dump-autoload
composer clear-cache
Or can someone provide a more simple way of being able to do what I want as

vscode extension development: svelte content not loading in webview after building the vscode extension

I am building a vscode extension by using svelte for webview. I am following https://youtu.be/a5DX5pQ9p5M. But the deployment of extension is not mentioned in the tutorial .
So i am following https://code.visualstudio.com/api/working-with-extensions/publishing-extension.
So after packaging the extension with vsce package and installing the extension the extension doesn't load svelte content but when running in developer mode everything works fine.
I tried creating the package extension multiple Times but still didn't work.
Check if all necessarily files are included via:
vsce ls
(You can also open packaged extensions, they are just ZIP-archives with a different extension.)
If they are not (e.g. src is excluded by default), you probably can create a .vscodeignore file and manually specify what to exclude.
Running extension problems can be inspected via Help > Toggle Developer Tools, usually you will find some errors in the console.
I do not know if debugging forces the extension to load, but if so, make sure you have set the correct activationEvents.

typo3 crashed page after installed extension

After I instaled extension in typo 3 version 4.5 I can't log in to backend, my page is blank and after I try to go on http://mydomain/typo3/install/index.php I get this message :
The Install Tool is locked.
Fix: Create a file typo3conf/ENABLE_INSTALL_TOOL
This file may simply be empty.
For security reasons, it is highly recommended to rename
or delete the file after the operation is finished.
If the file is older than 1 hour TYPO3 has automatically
deleted it, so it needs to be created again.
Installing any extensions in such an old TYPO3 probably will kill your installation, as any modern extension is incompatible to the old sources.
Modern extensions have namespaces, autoloader, use API classes and functions unknown to the old installation, maybe even use PHP7 features unknown to the old PHP which is needed to run those old TYPO3.
now for your cleanup:
For entering the instal-tool do as the message indicates:
create/update that file and then you can enter the install tool.
but in 4.5 you will not get much help to get the system running again.
you must disable the malicious extension:
in the file typo3conf/localconf.php you need to delete the extension key from the list of installed (active) extension. For this you can use any editor. One is build in the InstallTool.
After that you need to remove the cached version of the localconf.php: remove the temp* files in the folder typo3conf/.
Now your system should work again (but still might be unclean).
you should remove the extension (typo3conf/ext/extensionkey).
Maybe there are new tables and fields in the database. Therefore do a database compare in the InstallTool.

How can I add a composer.json to a static TYPO3 project?

I am using a working TYPO3 7.6.14 environment with many extensions. Now I want to add a composer.json file manually. I do not want to create a new project which will download the latest TYPO3 core and TYPO3 extensions. I am afraid that this could accidently overwrite some extension's PHP files.
I need a safe way to add a composer.json file which will not change the present TYPO3 PHP files automatically. I prefer to download TYPO3 and the extensions manually. Therefore I do not want to use the composer mode. I must find a way to prevent composer from overwriting my self written PHP files.
I need a composer.json file because I want to add the external TCPDF library which is on its own place on the file system and not inside of a vendor folder inside of TYPO3. And the file ext_autoload.php is not supported any more by TYPO3 7.6.
I have read the https://usetypo3.com/typo3-and-composer.html#c51 recommendations. But it only shows the way how to create a new TYPO3 project using the command line and the composer command. Is it also possible to download a composer.json file into a TYPO3 folder (which?) in order to tell the autoloader where it will find the external TCPDF library?
I have unzipped the TCPDF file under /var/www/html/TCPDF-master/tcpdf.php . I want to use TCPDF, TYPO3 and its extensions unchanged and never updated by any composer command.
Introducing Composer for not using it's features seems a bit strange to me, but yes, it's possible to define a dedicated version or commit-hash in a repository to disable updates.
However, I would recommend to make use of the tilde ~ operator to enable updates on the accordant branch, to e.g. include security updates automatically. For TYPO3 CMS this dependency would look like the following, to stay on the 7.6 branch:
"require": {
"typo3/cms": "~7.6.14"
}
Find further details on how to declare versions in the Composer documentation.
Besides that, it seems, that you're not using Composer at all for the root project. You could then create a wrapper extension for TCPDF with one of these options:
use Composer for that extension to require TCPDF and load the generated autoload file (e.g. in typo3conf/ext/tcpdf/vendor/autoload.php) in your wrapper extension
directly copy & paste TCPDF's source (which seems to be the scenario you're up to) and add the autoloading information to ext_emconf.php, which is similar to previous ext_autoload.php - find details about that in a blog post about class loading

zendframe work with ubuntu 11

I have download the zendframe work v 1.11.5 on ubuntu 11 (every thing else is installed) after putting the command zf create project /var/www/name it gives me a lot of warnings,so how to set up the zend frame work properly..
the warning:
Note: This command created a web project, for more information setting up your
VHOST, please see docs/README
PHP
Warning:
require_once(PHP/CodeCoverage/Filter.php):
failed to open stream: No such file or
directory in
/usr/share/php/PHPUnit/Autoload.php on
line 46 PHP Stack trace:
I know the solution,the problem is with phpUnit and pear ,if any one try to install phpUnit from the repository then he will got the warning above,so you need to install it by pear.
try in the terminal:
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
sudo pear install phpunit/PHPUnit
however you will another probelm after doing line 3 because you need to upgrade pear so do this before line 3:
sudo pear upgrade
then DO Step 3 again
sudo pear install phpunit/PHPUnit
of course you need also to set the path in php.ini try(locate php.ini)
then in the file file add these :
include_path=".:/usr/share/php:/usr/share/pear:/usr/share/php/PHPunit:/usr/share/php/PEAR"
notice the path to pear and PHPUnit, so if your path different you have to locate your path ;)
hope thats help :)
Go to the any web directory say, /var/www/html/test
Now call the zf.sh file in the bin folder of zend framework to create new project
In my case I extracted the zend framework in /var/ww/html/zend-framework
So I called the zf.sh file as follows
/var/www/html/zend-framework/bin/zf.sh create project zendtest
Now a project called called “ zendtest “ has been created in the current directory. This project will have four Sub folders.
Now we need to include the Libraries in the zend framework in our new project. To do that, just copy the folder called Zend from the library folder of our zend framework. (in my case I copied /var/ww/html/zend-framework/library/Zend ).
That’s all, we have created a sample project in Zend framework. We can test it using browsing the Public folder in the new project
http://localhost/ test/zendtest/public/