Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Can't create new pages [Solved]
Avatar
kantel #1
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
Subject: Can't create new pages [Solved]
I'm not quite shure if it is a bug or a configuration error but since a few days (I think since I installed the blog plugin but I'm not quite shure) I can't create new pages in my wiki. If I create a new page I get the following error code:

Warning: Invalid argument supplied for foreach() in /mnt/web1/52/75/5212475/htdocs/dokuwiki/inc/HTTPClient.php on line 427
Warning: Cannot modify header information - headers already sent by (output started at /mnt/web1/52/75/5212475/htdocs/dokuwiki/inc/HTTPClient.php:427) in /mnt/web1/52/75/5212475/htdocs/dokuwiki/inc/actions.php on line 296

But if I ignore this and refresh my browser the page is created. What's going wrong here?

(My DokuWiki Version is 2007-06-26b and it's hosted by a German mass hoster (Strato) with PHP 5.2.2. And pls. excuse my bad (d)english)

J"org
This post was edited on 2008-01-10, 07:55 by kantel.
Avatar
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3471 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hmm... I don't know why the HTTP client is even called on page creation. Could you post a list of all the plugins you have installed?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
kantel #3
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
Yes sure:

  * Flickr PlugIn
  * Google Video
  * YouTube
  * Sevenload (it's a plugin I wrote by myself, a variant of the YouTube plugin)
  * FlowPlayer PlugIn
  * Gallery PlugIn
  * Video PlugIn
  * GoogleMaps PlugIn

  * S5 PlugIn
  * Box BlugIn

  * The Blog PlugIn with a lot of helper plugins like include, pagelist, tag, discussion

  * Finally I use the Monobook template and therefore I installed the Display WikiPage PlugIn

I have all my installed PlugIns documented here http://www.cognitiones.de/doku.php/installierte_plugins, incl. the Patches ;-)
Avatar
kantel #4
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Eine Überlegung von mir wäre, ob sich vielleicht das include PlugIn mit dem Display Wiki Page PlugIn nicht verträgt. Sie machen beide so ziemlich dasselbe und kommen sich daher vielleicht in die Quere. Ich verstehe allerdings zu wenig von PHP um das verifizieren zu können.
Avatar
kantel #5
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
Habe das mal überprüft und die PlugIns separat abgeschaltet. Der Fehler tritt immer noch auf... :-(
Avatar
andi (Administrator) #6
User title: splitbrain
Member since May 2006 · 3471 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I still have no idea why this happens for you. But here is how to fix it.

Open inc/HTTPClient.php and look for line 427 - it should look like this:

  1.       foreach ($this->cookies as $key => $val){

Change it to

  1.       foreach ((array) $this->cookies as $key => $val){

Let us know if this works for you.

PS: please keep it to English in the non-German forums ;-)
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
kantel #7
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
Sorry, it didn't work. I changed this line of code but the warnings still exist. I tried it several times to avoid caching effects.

And OK, I will try to write English (although it's very uncomfortable for me, I learned Latin and Ancient Greek at school – not these modern languages.  ;-)
Avatar
andi (Administrator) #8
User title: splitbrain
Member since May 2006 · 3471 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
But line 427 looked exactly as I said?

Could you give me write permissions at your wiki? (Registered as splitbrain).
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
kantel #9
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
Yes, I changed that (my Editor say it's line 411, but it's the function _getCookies). And I you will have write permissions to my wiki from now. :-)
Avatar
kantel #10
Member since Nov 2007 · 12 posts · Location: Berlin-Neukölln
Group memberships: Members
Show profile · Link to this post
In reply to post #8
It works now!!!!!

I repeated the (array) trick on the real line 427 also (it's the function _postEncode):

I changed

foreach( $data as $key => $val){

 in

foreach((array) $data as $key => $val){

I'm not really sure what happens there (I'm only an occasional PHP coder) but maybe it's a problem of the differences between PHP 4.x and PHP 5.x
Avatar
andi (Administrator) #11
User title: splitbrain
Member since May 2006 · 3471 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
That's why I asked. Your error was in 427 but since I'm working on a current devel system linenumbers may not always be the same. So the problem seems to be a HTTP post with no data. I still have no idea why this should happen but I'm glad it works for you.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-19, 16:40:23 (UTC +02:00)