Click to See Complete Forum and Search --> : An idea for the server-side forums
Mr Initial Man
02-09-2009, 04:11 PM
I was thinking what we could do for the server-side forums is for each forum, have a sticky thread for errors that show up.
The rules for this thread are: Post an error you encountered, what caused the error and what you did to fix it.
For example, when I was working with PHP, I got an "Illegal Offset Type" error. Huh? After checking through my kid, I found the problem.
Error: Illegal Offset Type
What Caused The Error:
$xml_dom = new DOMDocument();
$xml_dom -> loadXML(file_get_contents('./links.xml'));
...
$links = $xml_dom -> getElementsByTagName ('link');
foreach ($links as $link){
...
$name = $link->getElementsByTagName('name');
...
$link_arr[0][$name] = ('<li><a href="' . $url . '">' . $name->item(0)->nodeValue . '</a></li>');
...
}
In short, I was trying to use an object (:eek:) as a key, which is a no-no. After looking through my code, I adjusted $name to work like so:
...
$name = $link->getElementsByTagName('name')->item(0)->nodeValue;
$link_arr[0][$name] = ('<li><a href="' . $url . '">' . $name . '</a></li>');
There. A nice string for PHP to work with.
scragar
02-13-2009, 02:46 PM
That sounds like a good idea, a lot of the errors are common, and easily fixed.
It would need an index though, if it's page after page of errors and explanations then someone will have to maintain a set of links to all the posts after the first page, otherwise it will just become a time-sink.
bathurst_guy
02-13-2009, 09:31 PM
Me too. Even if there isn't an index and just using Google to search for the error string (which is what I mostly do first) it would show up with WebDeveloper and bring in more users too.
Mr Initial Man
02-14-2009, 02:42 AM
That sounds like a good idea, a lot of the errors are common, and easily fixed.
It would need an index though, if it's page after page of errors and explanations then someone will have to maintain a set of links to all the posts after the first page, otherwise it will just become a time-sink.
You do have a "search this thread" tool, though. Would that do for an index?
Heck, we can also make such a into the JavaScript Forum as well.
So... suggested rules:
Do not post unsolved code problems here. To post, your problem must already have been solved.
Explain the problem clearly.
If you were dealing with a code error, include the exact error feedback.
Show both before and after code.
Describe what exactly was wrong with the code.
Make sure to use lots of appropriate keywords.
Stephen Philbin
02-14-2009, 04:12 PM
Sounds like a good idea to me too. It would be good to have one of each parser/interpreter error in an index in the first or second post that directly links to each post containing the error and its most common causes.
And like Barthurst said, even if it's not a nice neat index Google or the forum search can still help people looking for an answer.
scragar
02-14-2009, 04:21 PM
You do have a "search this thread" tool, though. Would that do for an index?
I don't like using the search this thread feature, I don't always have javascript enabled(nor am I often using a gui browser), so it would limit me, besides, which is easier:
----------- Search this thread feature
Click search this thread. Click search box Type search term, press enter Wait for results Click result
---------- A real index
Press / Type keyword press enter to follow link
Personally I like the second, no mouse.
Heck, we can also make such a into the JavaScript Forum as well.
So... suggested rules:
Do not post unsolved code problems here. To post, your problem must already have been solved.
Explain the problem clearly.
If you were dealing with a code error, include the exact error feedback.
Show both before and after code.
Describe what exactly was wrong with the code.
Make sure to use lots of appropriate keywords.
I want to make sure:
Use the relevant forum code rendering tags for your needs:
and for PHP code(and javascript/perl),
and for HTML
and for anything else/regexps in perl or javascript(which get ruined with the PHP tags)
Get's in there, I really hate people not putting [code] tags around 30 lines of code, I don't even bother to read the problem's now, I see the ugly code and close the tab :(
Mr Initial Man
02-14-2009, 05:25 PM
Point taken, scragar, and your rule suggestions are excellent. And I hadn't really considered the Javascript deal. Can moderators edit posts after 30 minutes?
-----------------------
Suggested rules so far:
Do not post unsolved code problems here. To post, your problem must already have been solved.
Explain the problem clearly.
If you were dealing with a code error, include the exact error feedback.
Show both before and after code.
Describe what exactly was wrong with the code.
Make sure to use lots of appropriate keywords.
Use the relevant forum code rendering tags for your needs:
and for PHP code(and javascript/perl),
and for HTML
and for anything else/regexps in perl or javascript(which get ruined with the PHP tags)
scragar
02-14-2009, 05:29 PM
Oh, yeah. I forgot about that time limit.
http://www.webdeveloper.com/forum/showthread.php?t=102044 -- yes they can, NogDog did it there after three days(well, almost 3 days), and that was after only a quick search.
Mr Initial Man
02-14-2009, 05:32 PM
Excellent. :) In this case, a moderator would be the one to keep updating the index.
Charles
02-16-2009, 02:37 PM
Just be aware. As experience has shown, nobody reads the stickies.
scragar
02-16-2009, 02:39 PM
Just be aware. As experience has shown, nobody reads the stickies.
True, but it will save us typing up an explanation when people run into the same problems.
Besides, some people read the stickies.
JPnyc
02-17-2009, 10:11 AM
I say go with it. Charles is quite correct however, people do not read stickies or announcements, but at least, as already mentioned, you can just link to it by way of a reply. And every once in a while, who knows, somebody may actually use the search feature.
Mr Initial Man
02-18-2009, 01:52 AM
I created the threads:
PHP (http://www.webdeveloper.com/forum/showthread.php?t=202456)
Perl (http://www.webdeveloper.com/forum/showthread.php?p=980035)
.NET (http://www.webdeveloper.com/forum/showthread.php?p=980036)
JAVA (http://www.webdeveloper.com/forum/showthread.php?p=980037)
ASP (http://www.webdeveloper.com/forum/showthread.php?p=980038)
SQL (http://www.webdeveloper.com/forum/showthread.php?p=980039)
XML (http://www.webdeveloper.com/forum/showthread.php?p=980041)
JavaScript (http://www.webdeveloper.com/forum/showthread.php?p=980042)
Did I miss any?
True, but it will save us typing up an explanation when people run into the same problems.
Maybe those links can serve as our index. Just kidding.