Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Remove Colorizer to get Layout editor working
#1
I've been having problems entering the layout editor for some modules. After turning on the debug by adding:
Code:
error_reporting(E_ALL);
ini_set("display_errors", "on");
to the top of the index.php file I was able to find out that there was a fatal call to the colorizer module (by Stefan Warnat). This being a development environment and not using the module that extensively I decided to remove the module with the deleteModule script in the build/helperscripts folder.

After that, I even removed the tables Colorizer created created from the database (I looked in the module manifest and these were the only two it created). Now, when I try to open the Layout editor of for instance Sales Orders, I still get:

Code:
Sorry! Attempt to access restricted file.
We are looking for this file path: modules/Colorizer/Colorizer.php
We are looking here:
Real file path:
Root dir path: /my_path/crmdevelop/

So still there is some reference to the module, but I can't find it.

EDIT:
Also the detailview for all modules that used Colorizer are now not functioning, giving the same message. I thing module includes will not be done in Smarty files, so I need to look in some PHP files that make up the detailview I think.

An update:

I re-installed the module Colorizer (just for debugging) and this is the fatal error in the Layout Manager:

Code:
Fatal error: Call to undefined method Colorizer_ColorWidget::title() in /home/guidog/domains/cbx-nederland.nl/public_html/crmdevelop/modules/Settings/LayoutBlockList.php on line 356

Looking into the file LayoutBlockList.php I see the 'widgets' are loaded here. Maybe the uninstalling of Colorizer did not remove the widget registration? Now to find out where the widgets are stored and how to remove them.
Reply
#2
Look in the vtiger_eventhandlers table, that is where these are registered
If you can send me a copy of the module I will have a look and give you better guidance
Joe
TSolucio
Reply
#3
Thank Joe,

I solved this, I also contacted Stefan, the developer of this module and he helped me fix this. There were 4 entries for Colorizer module in the table "vtiger_links", I removed them and the layout editor was fine again.

He is going to contact you also.
Reply
#4
Good!
I need to speak with too :-)

Have a nice weekend
Joe
TSolucio
Reply
#5
(11-06-2015, 10:09 AM)joebordes Wrote: Good!
I need to speak with too :-)

Have a nice weekend

He told me he would contact you so I suppose he will.

One thing extra for my understanding of the system: what does the vtiger_links table do? What are the widgets in the layout editor? I always thought widgets were the name for the module summaries you could place on your home screen, but here this term was also used. I'd like to know what the problem exactly was so I can investigate better next time on my own.

You too, have a nice weekend!
Reply
#6
Basically right panel detail view actions and inline blocks (like comments) are saved in vtiger_links:
http://corebos.org/documentation/doku.php?id=en:devel:corebos_hooks#linkstypes_and_usage

If a right panel action is a box with functionality, which may also be inline with the other blocks, it is called a "detail view widget"

Now you can order detail view widgets that appear as you would with any other block in the detail view, so you could put comments first (for example).

http://corebos.org/documentation/doku.php?id=en:devel:add_special_block
Joe
TSolucio
Reply
#7
(11-06-2015, 12:12 PM)joebordes Wrote: Basically right panel detail view actions and inline blocks (like comments) are saved in vtiger_links:
http://corebos.org/documentation/doku.php?id=en:devel:corebos_hooks#linkstypes_and_usage

If a right panel action is a box with functionality, which may also be inline with the other blocks, it is called a "detail view widget"

Now you can order detail view widgets that appear as you would with any other block in the detail view, so you could put comments first (for example).

http://corebos.org/documentation/doku.php?id=en:devel:add_special_block

Thanks! I'll read into this.
Reply
#8
(11-06-2015, 12:12 PM)joebordes Wrote: Basically right panel detail view actions and inline blocks (like comments) are saved in vtiger_links:
http://corebos.org/documentation/doku.php?id=en:devel:corebos_hooks#linkstypes_and_usage

If a right panel action is a box with functionality, which may also be inline with the other blocks, it is called a "detail view widget"

Now you can order detail view widgets that appear as you would with any other block in the detail view, so you could put comments first (for example).

http://corebos.org/documentation/doku.php?id=en:devel:add_special_block

So let me see if I understand this step by step:


Code:
include_once('vtlib/Vtiger/Module.php');

Includes the Module.php file (but only if it hasn't been included already), where a bunch of generic classes and methods live.

Code:
$moduleInstance = Vtiger_Module::getInstance('ModuleName');
Creates an instance using a static method from the class in Module.php, using the module name we want to create a link to.

Code:
$moduleInstance->addLink(<LinkType>, <LinkLabel>, <LinkURL>, <IconPath>);
That instance inherits the method "addLink" from Module.php, and we can use some arguments to specify what we want the link to do.

Is that the correct way to interpret this?

And we would place this code in the php file that creates a detailview for a specific module?

Just trying to learn the basics of how the system architecture is set up.

Where can I get some information about the global $adb instance? I see there are some methods used from this class to order query results but I don't fully understand them.
Reply
#9
Yes you described that correctly.
Note that it is a detail view BLOCK, not the whole detailview. Also you can add other types of links, on the listview and other places too.

Please open a new thread when changing topic. For example, for the $adb question, whose answer is: look in include/database/peardatabase.php
Joe
TSolucio
Reply
#10
Hey Joe,

Thanks, yes I understand. In this way the detailview is modular.

No problem, I'll keep that in mind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)