Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
135 views
in Plugins by
edited by
Is there a blog page with a QA modules structures analysis ( comparison between plugins, widgets, those using specifically DB , those creating pages or not , etc ) and perhaps a comparison with modules of other CMS ?

To save 2 or 3 days of reading core , thank you

I should want also to know if a widget used twice in a page is instancied once or twice and to understand why XXXX_page::process_request() is sometimes called twice

Edit : I traced process_request() and it is executed twice in dbsave just to show the page registred in qa_plugin, before any interaction. I want to know if it is related to the selected model I used.
Q2A version: 1.7

1 Answer

+2 votes
by

Nope, I haven't ever seen such a post. Closest thing would be: http://www.question2answer.org/developers.php

No module is instanced twice. Widgets are not exceptions. Anyway, process_request() methods are defined in page modules rather than widgets. From the core's point of view, they are not called more than once. Maybe the plugin itself is explicitly calling it too. Note that I assume you're talking about running that method more than once from the same module.

You might also be confusing process_request() with match_request(). The latter can be called many times for different page modules until there is a match or all modules are traversed.

by
edited by
I'm not confounding such things:) To be understood, better than writing , I'll prepare something this week end.
...