HazardJ / Cmacc-Mediawiki

Out of date - go see
http://github.com/CommonAccord/Org
0 stars 1 forks source link

Still missing setup instruction #2

Closed mdangear closed 10 years ago

mdangear commented 10 years ago

Now able to run MW with the "binder.php" extension, but getting an error message when clicking on the "Render" button after creating a test page MarcD/Agt_Cadre

Not Found The requested URL /wiki/MarcD/Agt_Cadre was not found on this server. <<

HazardJ commented 10 years ago

I'm a little lost, but seems that the problem here is the /wiki/ vs /index.php/.

and that's in the binder.php:

        $form = '<form method="get" action="/mediawiki/index.php/'.$_REQUEST['title'].'">

If we can't find a solution fast, I should probably ask Andrew to help us out.

On Jan 22, 2014, at 6:31 PM, Marc Dangeard wrote:

Now able to run MW with the "binder.php" extension, but getting an error message when clicking on the "Render" button after creating a test page MarcD/Agt_Cadre

Not Found The requested URL /wiki/MarcD/Agt_Cadre was not found on this server. <<

— Reply to this email directly or view it on GitHub.

mdangear commented 10 years ago

I do not see a $form = '

in the binder.php that you sent, I only see a $form = ' in 2 locations (following each other actually it looks like a repeat as I do not see the difference or why there are 2). If I try to touch this, then I get a blank page, MW stops working.

HazardJ commented 10 years ago

What are you editing with?

On Jan 22, 2014, at 9:51 PM, Marc Dangeard wrote:

I do not see a $form = '

in the binder.php that you sent, I only see a $form = ' in 2 locations (following each other actually it looks like a repeat as I do not see the difference or why there are 2). If I try to touch this, then I get a blank page, MW stops working. — Reply to this email directly or view it on GitHub.

mdangear commented 10 years ago

Textedit, this is the only editor I have on my machine at this point. Should I use something else?

Marc Dangeard @mdangear /+1 415 729 4342 http://about.me/marc.dangeard text Dangeard Group on Instaply http://www.instaply.com/

On Wed, Jan 22, 2014 at 9:52 PM, HazardJ notifications@github.com wrote:

What are you editing with?

On Jan 22, 2014, at 9:51 PM, Marc Dangeard wrote:

I do not see a $form = '

in the binder.php that you sent, I only see a $form = ' in 2 locations (following each other actually it looks like a repeat as I do not see the difference or why there are 2). If I try to touch this, then I get a blank page, MW stops working. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/HazardJ/Cmacc-Mediawiki/issues/2#issuecomment-33099106 .

HazardJ commented 10 years ago

Yeah. TextEdit is said to be lethal. Puts in some bad line ends.

mdangear commented 10 years ago

Sp what then? what do you use?

Marc Dangeard @mdangear /+1 415 729 4342 http://about.me/marc.dangeard text Dangeard Group on Instaply http://www.instaply.com/

On Wed, Jan 22, 2014 at 9:55 PM, HazardJ notifications@github.com wrote:

Yeah. TextEdit is said to be lethal. Puts in some bad line ends.

— Reply to this email directly or view it on GitHubhttps://github.com/HazardJ/Cmacc-Mediawiki/issues/2#issuecomment-33099171 .

HazardJ commented 10 years ago

Aquaemacs. Total overkill and hard to get used to. Perhaps reconfiguring TextEdit does the job? http://support.apple.com/kb/ta20406

mdangear commented 10 years ago

Actually I installed AptanaStudio. Overkill too but I seem to be able to modify the binder script without screwing up everything. Now if I replace /wiki/ by /index.php/ I still get an error:

Not Found The requested URL /index.php/MarcD/P1 was not found on this server.

Error without replacing is:

Not Found The requested URL /wiki/MarcD/P1 was not found on this server.

What I think I need is /wiki/index.php/ but for some reason if I try that I get the same error as #1

mdangear commented 10 years ago

Actually progress:

mdangear commented 10 years ago

Thought that maybe it was an issue with LocalSettings.php since I edited with TextEdit, so I re-installed MW to produce a clean MW. Added a command to ShowExceptionDetails to LocalSettings.php which gives me this below - showing an error in binder.php, problem with Title:

Call to undefined method SkinVector::setTitle Backtrace:

0 /Applications/MAMP/htdocs/wiki/extensions/Binder/Binder.php(167): Skin->__call('setTitle', Array)

1 /Applications/MAMP/htdocs/wiki/extensions/Binder/Binder.php(167): SkinVector->setTitle(Object(Title))

2 [internal function]: Binder->renderBinderTag('?MarcD/Agt Cadr...', Array, Object(Parser), Object(PPFrame_DOM))

3 /Applications/MAMP/htdocs/wiki/includes/parser/Parser.php(3916): call_user_func_array(Array, Array)

4 /Applications/MAMP/htdocs/wiki/includes/parser/Preprocessor_DOM.php(1144): Parser->extensionSubstitution(Array, Object(PPFrame_DOM))

5 /Applications/MAMP/htdocs/wiki/includes/parser/Parser.php(3073): PPFrame_DOM->expand(Object(PPNode_DOM), 0)

6 /Applications/MAMP/htdocs/wiki/includes/parser/Parser.php(1153): Parser->replaceVariables('?MarcD/...')

7 /Applications/MAMP/htdocs/wiki/includes/parser/Parser.php(383): Parser->internalParse('?MarcD/...')

8 /Applications/MAMP/htdocs/wiki/includes/content/WikitextContent.php(299): Parser->parse('?MarcD/...', Object(Title), Object(ParserOptions), true, true, 18)

9 /Applications/MAMP/htdocs/wiki/includes/WikiPage.php(3402): WikitextContent->getParserOutput(Object(Title), 18, Object(ParserOptions))

10 /Applications/MAMP/htdocs/wiki/includes/PoolCounter.php(209): PoolWorkArticleView->doWork()

11 /Applications/MAMP/htdocs/wiki/includes/Article.php(707): PoolCounterWork->execute()

12 /Applications/MAMP/htdocs/wiki/includes/actions/ViewAction.php(44): Article->view()

13 /Applications/MAMP/htdocs/wiki/includes/Wiki.php(439): ViewAction->show()

14 /Applications/MAMP/htdocs/wiki/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))

15 /Applications/MAMP/htdocs/wiki/includes/Wiki.php(565): MediaWiki->performRequest()

16 /Applications/MAMP/htdocs/wiki/includes/Wiki.php(458): MediaWiki->main()

17 /Applications/MAMP/htdocs/wiki/index.php(59): MediaWiki->run()

18 {main}

mdangear commented 10 years ago

Noticed a line where a url is hardcoded in the script:

$ret = preg_replace('%(a href="http://commonaccord.org/wiki/.*)(".*/a)%Us',"$1?action=edit$2",$ret);

could it be where the issue comes from?

mdangear commented 10 years ago

Also differences in the LocalSettings. What I have:

Uncomment this to disable output compression

$wgDisableOutputCompression = true;

$wgSitename = "CommonAccord"; $wgMetaNamespace = "CommonAccord";

The URL base path to the directory containing the wiki;

defaults for all runtime URL paths are based off of this.

For more information on customizing the URLs

(like /w/index.php/Page_title to /wiki/Page_title) please see:

http://www.mediawiki.org/wiki/Manual:Short_URL

$wgScriptPath = "/wiki"; $wgScriptExtension = ".php";

The protocol and server name to use in fully-qualified URLs

$wgServer = "http://localhost:8888"; <<

What you show in the LocalSettings on this site:

Uncomment this to disable output compression

$wgDisableOutputCompression = true;

$wgSitename = "Commonaccord.org";

The URL base path to the directory containing the wiki;

defaults for all runtime URL paths are based off of this.

For more information on customizing the URLs please see:

http://www.mediawiki.org/wiki/Manual:Short_URL

$wgScriptPath = "/w"; $wgScriptExtension = ".php";

$wgScriptPath = "/w"; # Path to the actual files (right part of first rewrite rule). Should already be in LocalSettings.php $wgArticlePath = "/wiki/$1"; # Virtual path (left part of first rewrite rule). MUST be DIFFERENT from the path above! $wgUsePathInfo = true; <<

So missing stuff that seem to be related to short urls ($wgArticlePath)

HazardJ commented 10 years ago

I don't seem to have this in LocalSettings or binder

Noticed a line where a url is hardcoded in the script: $ret = preg_replace('%()%Us',"$1?action=edit$2",$ret); could it be where the issue comes from?

On Jan 22, 2014, at 11:33 PM, Marc Dangeard wrote:

Noticed a line where a url is hardcoded in the script: $ret = preg_replace('%()%Us',"$1?action=edit$2",$ret); could it be where the issue comes from?

— Reply to this email directly or view it on GitHub.

mdangear commented 10 years ago

Yes, editor messed up the link, it is something like this: $ret = preg_replace('%(HARD CODED LINK POINTING TO COMMONACCORD)%Us',"$1? action=edit$2",$ret);

At Nest today if you are

Marc Dangeard @mdangear /+1 415 729 4342 http://about.me/marc.dangeard text Dangeard Group on Instaply http://www.instaply.com/

On Thu, Jan 23, 2014 at 2:58 AM, HazardJ notifications@github.com wrote:

I don't seem to have this in LocalSettings or binder

Noticed a line where a url is hardcoded in the script: $ret = preg_replace('%()%Us',"$1?action=edit$2",$ret); could it be where the issue comes from?

On Jan 22, 2014, at 11:33 PM, Marc Dangeard wrote:

Noticed a line where a url is hardcoded in the script: $ret = preg_replace('%()%Us',"$1?action=edit$2",$ret); could it be where the issue comes from?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/HazardJ/Cmacc-Mediawiki/issues/2#issuecomment-33114331 .

mdangear commented 10 years ago

As it turns out the binder.php file has a couple instructions that were commented out, and this was the cause of the problem. Resolved now.