Hi,
thanks for your suggestions, at the end I found it :-)
It was a closed data base connection, that prevented
Title::newFrom...-methods to get articleId etc.
--- the eval part ---
$dbReadOnly2 = wfGetDB(DB_SLAVE);
# do some stuff
$dbReadOnly2->close();
# use another method that needs data base access will fail
-----------
It is because wfGetDB(...); will get the database object as
*reference* not as copy (see PHP code of wfGetDB() in file
includes/GlobalFunctions.php) and as it is a reference and some other
function closes the dabta base connection then there is "silence" ...
at least for the db connection
Andreas
2013/1/16 Andreas Plank <andreas.plank(a)web.de>de>:
2013/1/16 Krenair <krenair(a)gmail.com>om>:
You could try RequestContext::getMain() to get
the context source object.
Alex Monk
On 16/01/13 16:56, Andreas Plank wrote:
I tried many functions in various classes:
RequestContext
WikiPage
Title
Article
... but it is always the same I do not get the raw page content. I
believe these functions should work but somehow they do not get the
right incoming data. In an earlier post I printed the Title object and
it is almost empty, I wonder about that too, might be related?
Maybe it has nothing to do with these functions but with the database?
However browsing and editing those pages runs smoothly but my
application does not get the related page data. I wonder too, because
with MW 1.18 it did work fine.
If I switch on $wgDebugDumpSql there are a lot of queries and also a page query
SELECT page_id, page_namespace, page_title, page_restrictions,
page_counter, page_is_redirect, page_is_new, page_random,
page_touched, page_latest, page_len FROM `page` WHERE page_namespace =
'X' LIMIT N
... So it seems the right query from a quick look.
Has anybody an idea how I can trace and debug the data flow until my
app asserts “the page does not exist”?
Andreas