Typo3 V9 Backendmodule View not found - typo3

I try to write an backend module, i start up with the ext_tables.php and so an, i create an Controller that called correctly. When i click on my module in the backend i get an error:
The technical reason is: No template was found. View could not be resolved for action "list" in class "Trendsetzer\Statistik\Controller\StatController".
In the Typoscript Browser i checked the paths and all setted correctly: EXT:ts_statistik/Resources/Private/Templates/ why they dont find the template file?
how can i show in which path they try to find the file?

For frontend and backend you have 2 different typoscript paths.
plugin.tx_myext for frontend modules and module.tx_myext for backend modules.

When I started creating extensions, I often miss adding the typoscript to my root template.
You can add this by Module "Template" -> Your Root Page -> Edit the whole template record -> Tab "Includes" -> Include static (from extensions)

Solution found, the namespace was incorrect: for extensions with underscore the namespace for extensionsn like foo_bar must be Vendor\FooBar\...
hope this helps anyone

Related

Service Unavailable (503) No TypoScript template found

I tried to install the introduction package in Typo3 cms.
But I receive the following error:
Service Unavailable (503) No TypoScript template found!
You might need to include the package into your core template in Typo3.
Whenever you are using a new package/extension which having template files, you are needed to added those in your root template.
Go to Template Menu in the typo3 backend
Select the root page from the treelist on the left side panel (it might be Congratulations).
Choose the info/modify from the top list
click on Edit the whole template record button.
Choose the includeTab
Add the package related to it.

TYPO3 Service Unavailable (503)

I installed a copy of a TYPO3 project. So, I'm using an existing TYPO3 database.
When running the home page of the site, I get the 'standard error':
Service Unavailable (503)
The page is not configured! [type=0][]. This means that there is no TypoScript object of type PAGE with typeNum=0 configured.
More information regarding this error might be available online.
which refers to following site: https://wiki.typo3.org/Exception/CMS/1294587217
But when I modify the setup of the template of the root as given in the link. I get an empty page with "HELLO WORLD" and the whole website is gone.
The old root setup code was:
config.contentObjectExceptionHandler = 0
page.meta.description.data = page:description
page.meta.keywords.data = page:keywords
How can I solve this problem without losing the rest of the website? Using TYPO3 8.7
Addition to the db install I also copied the extension folders to the typo3conf/ext folder and edited the PackageStates.php with the path to the extensions.
I see the extensions in the extensions tab the status is 'local'.
1st: make sure you have the correct configuration of all domains (as it is a copy it can not run with the same domain, otherwise you will switch between servers unpredictably.
2nd: enter list mode and look for multiple template records in your web root page. Multiple records will result in ignoring all but one record. maybe you just edit the wrong one. Normally the content is not lost but only inaccessible for the moment.
3rd: have you activated all the extensions which are active in the source installation? especially any site extension, which probably include the configuration for the TypoScript page object.
4th: you can use the TSOB (TypoScript Object Browser) and the template analyzer to view the active or resulting typoscript.

class.tslib_pibase.php not found in my TYPO3 6.2.9

I want to include PHP code in my TYPO3, I found php_page_content, I installed the extension that I found here .
The installation went fine, no error, then I cleared my cache.
After addind a PHP content in my page
Then I got a fatal error saying :
PHP Fatal error: require_once(): Failed opening required
'/var/www/clevvermail/typo3/sysext/cms/tslib/class.tslib_pibase.php'
(include_path='/var/www/my_typo3/typo3/contrib/pear/:.:/usr/share/php')
in
/var/www/my_typo3/typo3conf/ext/page_php_content/pi1/class.tx_pagephpcontent_pi1.php
on line 30
I checked and I found no class.tslib_pibase.php in my TYPO3!!! How can I manage this ?
PS: I tried to use the extension Page PHP Content Element but it didn't work for me, I install and I find no PHP script in the content list to include.
You can find the solution here
In your class.tx_pagephpcontent_pi1.php on line 30
You can replace this
require_once(PATH_tslib . 'class.tslib_pibase.php');
By
if (!class_exists('tslib_pibase')) require_once(PATH_tslib . 'class.tslib_pibase.php');
This works for both Typo3 4.x and 6.2
I think that the extension is outdated and no compatible with TYPO3 6.2.
It gives no error just because in the file ext_emconf.php there is no constraint about the CMS version (!)
About the other extension you cited: I was able to make it work with these steps (TYPO3 6.2.30:
Install Extension
TS Setup > edit whole template record > include static from extension > include "Page PHP Content Element
(pe_pagephpcontentelement)"
Create a Sysfolder (like "phpscripts")
go to "phpscripts" > list view > create new > "Page PHP Content Element > P H P Content"
insert some code (like the one you provided) and save
go to a page > create new content element > tab "Plugins > "General
plugin"
After you insert the element, edit it, tab "Plugin" > from the
"selected plugin" dropdown, select "Page PHP content"
Tab Behavior > Record storage page > select the sysfolder
"phpscripts"
Save and preview
I am sorry, but I was not able to figure out how to select a single record from the sysfolder :(
You can install the extension migration_core or the extension compatibility6.
migration_core contains a Migrations/Code/ folder with class alias mappers. Every reference to the class "tslib_pibase" will be automatically referred to "\TYPO3\CMS\Frontend\Plugin\AbstractPlugin::class". It is sufficient to have it installed. However compatibility6 is not recommended, because it also contains other changes which have drawbacks.
If you still have the same error message, then open the TYPO3 Install Tool first tab "Important actions".
Dump Autoload Information
[Create autoload information for extensions]
This (re-)dumps autoload information for all active third party extensions.

my zf tools is creating the product controller in the wrong directory - is there a command list available anywhere

I am new to Zend Framework and also to Zend tools.
I have two questions regarding Zend tools.
Does anyone have any links for a detailed list of all the commands in Zend tools? I cannot seem to find anything?
For example: if I want to use the tool to create a controller in my modules directory as opposed to the controllers directory - how do I use the tool to do that? I tried to do the following but it did not work:
in my 'command prompt' I navigate to the site I am working in, I then navigated to the directory for modules; from there, I tried to create a controller for that directory i.e:
c:\theproject\application\modules\forms\controllers>zf create controller enquiry action products module forms
ZF gave the following error message: unknown argument left on the command line: module
However, when I tried to create the controller without the argument n the left, the ZF created the controller in the controllers directory.
SECONDLY
I want to use the Zend tool to delete pages that have already been created. I cannot seem to find the Zend tool command for that.
THIRDLY
I want to just create a normal page view. i.e page.phtml
I cannot seem to find the command for how to creating a normal page and to also specify what directory it will go in.
Module
zf create module name
Form
zf enable form module
zf create form name module
Layout
zf enable layout
zf disable layout
DbAdapter
zf configure db-adapter dsn section-name[=production]
DbTable
zf create db-table name actual-table-name module force-overwrite
Note: There are specialties, use zf create db-table.? to get specifi
them.
ProjectProvider
zf create project-provider name actions
:\xampp\htdocs\ZendFramework\rac>
From the root of your project type zf
You will get the list of commands it is having. Something like
Zend Framework Command Line Console Tool v1.11.11
Usage:
zf [--global-opts] action-name [--action-opts] provider-name [--provider-opts] [provider parameters ...]
Note: You may use "?" in any place of the above usage string to ask for more specific help information.
Example: "zf ? version" will list all available actions for the version provider.
Providers and their actions:
Version
zf show version mode[=mini] name-included[=1]
Note: There are specialties, use zf show version.? to get specific help on them.
Config
zf create config
zf show config
zf enable config
Note: There are specialties, use zf enable config.? to get specific help on them.
zf disable config
Note: There are specialties, use zf disable config.? to get specific help on them.
Phpinfo
zf show phpinfo
Manifest
zf show manifest
Profile
zf show profile
Project
zf create project path name-of-profile file-of-profile
zf show project
Note: There are specialties, use zf show project.? to get specific help on them.
Application
zf change application.class-name-prefix class-name-prefix
Model
zf create model name module
View
zf create view controller-name action-name-or-simple-name module
Controller
zf create controller name index-action-included[=1] module
Action
zf create action name controller-name[=Index] view-included[=1] module
Module
zf create module name
Form
zf enable form module
zf create form name module
Layout
zf enable layout
zf disable layout
DbAdapter
zf configure db-adapter dsn section-name[=production]
DbTable
zf create db-table name actual-table-name module force-overwrite
Note: There are specialties, use zf create db-table.? to get specific help on them.
ProjectProvider
zf create project-provider name actions
Then try zf --help command for more help on the command
The command to create a controller in modules directory is
zf create controller <Controllername> 1 <module-name>
and for more try it on a sample project.

Zend framework deployment on the shared hosting

I want to deploy my project made in zend framework to my shared hosting.
My project has such structure:
application
docs
library
Obsolete
public
scripts
tests
This is what I have done:
I copied Zend folder (all library files) into library folder
I copied all the structure above into public_html/projects/project
(so if I type www.mydomain.com/projects/project/public I run the project
I tried to click on some link so that it redirected me to www.mydomain.com/projects/project/public/someController/someAction
Unfortunately all i see is a white, empty page.
Locally (using Zend server CE) it worked perfectly
Here it looks like Zend doesn't recognize that it should do anything with this url and redirecto to appropriate action.
What have I missed?
Greetings!
The reason you see empty page instead of errors is that error_reporting is probably off by default on your production server.
You may change the settings concerting displaying errors and exceptions in application.ini.
The other cases the errors are not displayed is something goes wrong in the view (eg. view helpers), which must return string, not the exception.
Things to check:
paths
include_path
permissions to write for files/dirs which do require this
PHP version
.htaccess setup
stating the obvious here but I'd check your apache error log.
You should check if the server is running php as a module or CGI, in the later case it will not read the SetEnv of .htaccess and you will have to set to development mode in index.php by hand, or specify your config in php.ini