Hi Platonides

2013/1/15 Platonides <platoni...@gmail.com>:
>> I tried to get the content via getArticleID() ...
>> $titleObj=Title::newFromText("Existing page");
>> $articleID=$titleObj->getArticleID();
>> Article::newFromID($articleID)->fetchContent();
>> etc.
>> ... but it returns $articleID=0 although the page exits. With MW 1.18
>> this approach worked fine, but after upgrade to MW 1.20.2 it does not
>> any more.
>
>
> It should be working, and it works for me on 1.20.2
> Can you provide more details on that $title->getArticleID(); which is
> not working?

On the http://offene-naturfuehrer.de/web/Spezial:MobileKeyV1
I want to generate a MobileKey for "Lamium (Deutschland)" (the page
exists) and the PHP code wants to get the content of page "Unterlippe
(Lamiaceae)" (the page exists too) but the PHP code above stops at the
step retrieving the articleID. The strange thing is, when I want to
generate a MobileKey for "Lamium (Deutschland)" and just print out
(1) Title::newFromText("Unterlippe (Lamiaceae)")  and
(2) Title::newFromText("Lamium (Deutschland)")
... I get only an articleID for (2) not for (1)

Andreas

--- printout of title object for page (1) "Unterlippe (Lamiaceae)"

Title Object
(
    [mTextform] => Unterlippe (Lamiaceae)
    [mUrlform] => Unterlippe_(Lamiaceae)
    [mDbkeyform] => Unterlippe_(Lamiaceae)
    [mUserCaseDBKey] => Unterlippe_(Lamiaceae)
    [mNamespace] => 0
    [mInterwiki] =>
    [mFragment] =>
    [mArticleID] => 0
    [mLatestID] =>
    [mEstimateRevisions:Title:private] =>
    [mRestrictions] => Array
        (
        )

    [mOldRestrictions] =>
    [mCascadeRestriction] =>
    [mCascadingRestrictions] =>
    [mRestrictionsExpiry] => Array
        (
        )

    [mHasCascadingRestrictions] =>
    [mCascadeSources] =>
    [mRestrictionsLoaded] =>
    [mPrefixedText] =>
    [mTitleProtection] =>
    [mDefaultNamespace] => 0
    [mWatched] =>
    [mLength] => -1
    [mRedirect] =>
    [mNotificationTimestamp] => Array
        (
        )

    [mHasSubpage] =>
)

--- printout of title object for page (2) "Lamium (Deutschland)"
Title Object
(
    [mTextform] => Lamium (Deutschland)
    [mUrlform] => Lamium_(Deutschland)
    [mDbkeyform] => Lamium_(Deutschland)
    [mUserCaseDBKey] => Lamium_(Deutschland)
    [mNamespace] => 0
    [mInterwiki] =>
    [mFragment] =>
    [mArticleID] => 36
    [mLatestID] =>
    [mEstimateRevisions:Title:private] =>
    [mRestrictions] => Array
        (
        )

    [mOldRestrictions] =>
    [mCascadeRestriction] =>
    [mCascadingRestrictions] =>
    [mRestrictionsExpiry] => Array
        (
        )

    [mHasCascadingRestrictions] =>
    [mCascadeSources] =>
    [mRestrictionsLoaded] =>
    [mPrefixedText] =>
    [mTitleProtection] =>
    [mDefaultNamespace] => 0
    [mWatched] =>
    [mLength] => -1
    [mRedirect] =>
    [mNotificationTimestamp] => Array
        (
        )

    [mHasSubpage] =>
)

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to