Yii module actions url - module

I have in my main project views/layouts/main.php the following 'events' module actions
array('label'=>'Events', 'url'=>'#', 'visible'=>UserUtility::isUser(), 'items'=>array(
array('label'=>'Konzerte', 'items'=>array(
array('label'=>'Erstellen', 'url'=>array('events/booking/create')),
array('label'=>'Verwalten', 'url'=>array('events/booking/admin')),
)),
If I click on 'Erstellen' the module action works perfectly. If I click on Verwalten afterwards I get the error
Error 404 Unable to resolve the request "events/events/concert/admin".*
The controller action obviously adds another
events/
in front of it if I'm already on a page from my events module. How can I overcome this problem?

You can try to create this url with createAbsoluteUrl() or add slash before /events
array('label'=>'Verwalten', 'url'=>array('/events/booking/admin')),

Related

Controller Not Found on prestashop 1.6 Admin panel

I have the message "Controller Not Found" when i try to see an order on my Prestashop Back-office.
The strange thing is that i have this error only on one order, and the others work correctly.
Do you have any idea ?
I'm on Prestashop 1.6.
Thanks a lot!
Please check that file AdminOrdersController.php is there at the following path of your PrestaShop directory:
/controllers/admin
If there is a file there then you can also check the permission for that file, it might be a permission issue.
Try deleting any closing php tags. That fixed my issue.
Thanks. I'm having the same issue.. I put that code in a controller file. I found out the issue in case. The issue was that I love code highlighting and often put <?PHP at the top of the blade views and the Controller (logic .php file).
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class JoeSearchController extends Controller
{
public function delete($id)
{
DB::table('user')->where('userID', '=', $id)->delete();
return redirect('history deleted');
}
}

I can't find my module in Odoo

I have created a module in Odoo 8 following a tutorial. I activated the technical features in Users then I've updated the module list but it doesn't appear in the list.
What should I do ?
Track the following:
checkout __init__.py, __openerp__.py files
weather any server track-back appear or not
find the path of addons module
is your module is at same place or path?
give read/write/execute permission for that module
restart your server
Go to browser, from GUI, Setting => Modules => Update Modules List => and Click on Update button
Now go to Setting => Modules => Local Modules => remove Apps filter on right hand side and type your module name
I hope after do these you will find your module.
After tried everything in #Odedra's answer, It worked when I created a new DB -> restarted the server -> Updated the App List.

Yii links not working properly

In my Yii application I defined rules in Yii's urlManager as follows:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'izletiste/<grad:\.*?>/<naziv:.*?>/<id:d+>'=>'izletiste/show',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
Now, when I want to create a link, I use the following construction:
<?php echo CHtml::link(CHtml::encode($izletiste->nazivIzletista),array("izletiste/show","grad"=>"Paris","naziv"=>"Some text", "id"=>$id)); ?>
The url I get is the following:
http://mywebsite.com/izletiste/Paris/Some+text/21
But when I click on the link, I get the following error:
Error 404
The system is unable to find the requested action "Paris".
My question is why is that happening, why Yii doesn't recognize that izletiste/show action should be called instead izletiste/paris, and how to fix this?
Try tho change first rule like here:
'izletiste/<grad>/<naziv>/<id:\d+>'=>'izletiste/show'

How to remove a Backend Modul of the Backend Menu in Contao

I developed an modul for contao 3.0. In my config.php file i wrote this lines:
$GLOBALS['BE_MOD']['content']['modultest'] = array(
'tables' => array('tl_modultest'),
'icon' => 'system/modules/modultest/time_go.png',
);
Now i have the problem, that i want to deinstall the modul. But the menupoint in the backend is still there, even if i deleted the lines above.
Can anybody help me to deactivate or delete deactivated or deinstalled modules from the backend menu ?
Your problem is probably that you did not rebuild the internal cache introduced in Contao 3.0. To do that, go to Maintenance, then under the section Purge select the checkbox labeled Purge the internal cache and click Purge data.

yiibooster sortable table rows are not working

I have problem with a Yiibooster sortable table rows. It is not working because of two errors.
The file "http://yii-cms.com/protected/extensions/bootstrap/assets/js/jquery.sortable.gridview.js" is not found by the system (404), although the rest of yiibooster files are working and I did installation according to the instructions.
The path to the "jquery.sortable.gridview.js" is generated by the system, I checked it and that file exists.
I installed Yiiboster by writing:
<?php
// main/config.php
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
'preload'=>array('log', 'bootstrap'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.admin.components',
'application.modules.admin.models.*',
'bootstrap.*',
),
// application components
'bootstrap' => array(
'class' => 'bootstrap.components.Bootstrap',
),
?>
The second error occurs in view file, near the 'afterSortableUpdate' property.
Uncaught TypeError: undefined is not a function
Please give me some advice. Thanks.
This looks like a bug of YiiBooster, try it with the newest version or you may report it here. Please mention your Yii version and YiiBooster version.
The assets need to be properly registered within Yii, so that they are cached in the assets folder. The protected folder is protected and requests to it are blocked.