|
Post by torkel on Aug 23, 2007 10:23:49 GMT -5
I installed greymatter a couple of weeks ago and have been playing around with the template since then to get to know the script and adapt it to my site. Then I didn't touch it for a few days because of work and school, and today when I sat down to keep working on it I ran into a problem. Every time I try to save the Miscellaneous template, I get a 500 error. All the other templates work fine, but not this one. As far as I can remember I haven't been messing around with any of the codes, and I've made sure that all the files are chmod'ed correctly. I have a back-up version of greymatter on the same server which I haven't edited at all, and saving the misc template works fine there. Any suggestion on what the problem might be, or what I might've done wrong? Please? This is what the error-screen tells me: 500: The web server does not support this method Problem The web server cannot complete your request. This is usually triggered by a misconfigured script. It may also be caused by a faulty .htaccess file. Details Problems found: Technical explanation: Premature end of script headers: gm.cgi Search for solutions
|
|
|
Post by coldstone on Aug 23, 2007 17:40:10 GMT -5
Are the misc templates identical to the ones that work for your backup?
Can you post your your misc template? If you can save your other templates, then your files are chmod'd correctly. If it only happens on that one page, I would suspect that there is something in the template that Greymatter is erroring out on.
|
|
|
Post by torkel on Aug 24, 2007 4:14:57 GMT -5
I've changed some of the code, but as far as I can remember I've only translated some of the words to norwegian (read more = les mer..) and added a few index.php?filename= to some of the links, which works fine on other templates.
So to answer your question, no, the code is not exactly the same, but no major changes have been madeas far as I can tell. And my problem is this: since I can't save my misc templates page, I can't copy the code from the backup to the one I'm currently using - because I can't save the page after doing so...
Is there any way I can "import" the miscellaneous template, without messing up the changes I've done in the other templates?
I've copy-pasted all of the miscellaneous codes underneath if you want to have a look at them..
Previouslink: [<a href="index.php?filename={{previouspagelink}}" onmouseover="window.status='{{previousmonthmonth}}/{{previousdayday}}/{{previousyear}}: {{previousentrysubject}}';return true" onmouseout="window.status='';return true">Previous entry: "{{previousentrysubject}}"</a>]
Nextlink: [<a href="index.php?filename={{nextpagelink}}" onmouseover="window.status='{{nextmonthmonth}}/{{nextdayday}}/{{nextyear}}: {{nextentrysubject}}';return true" onmouseout="window.status='';return true">Next entry: "{{nextentrysubject}}"</a>]
Previousmorelink: [<a href="index.php?filename={{previouspagelink}}" onmouseover="window.status='{{previousmonthmonth}}/{{previousdayday}}/{{previousyear}}: {{previousentrysubject}}';return true" onmouseout="window.status='';return true">Previous entry: "{{previousentrysubject}}"</a>]
Nextmorelink: [<a href="index.php?filename={{nextpagelink}}" onmouseover="window.status='{{nextmonthmonth}}/{{nextdayday}}/{{nextyear}}: {{nextentrysubject}}';return true" onmouseout="window.status='';return true">Next entry: "{{nextentrysubject}}"</a>]
log archives link template weekly: <a href="index.php?filename={{pagearchivelogindexlink}}">{{weekbeginningmonthmonth}}/{{weekbeginningdayday}}/{{weekbeginningyearyear}} to {{weekendingmonthmonth}}/{{weekendingdayday}}/{{weekendingyearyear}}</a> <br />
Log archives link template monthly: <a href="index.php?filename={{pagearchivelogindexlink}}">{{monthword}} {{yearyear}}</a> <br />
entry list link template standard: <a href="index.php?filename={{pagelink}}">{{monthmonth}}/{{dayday}}/{{yearyear}}: {{entrysubject}}</a> <br />
entry list link template extended: <a href="index.php?filename={{pagelink}}">{{monthmonth}}/{{dayday}}/{{yearyear}}: {{entrysubject}}</a> <br />
Search form template: <!-- searchform code begin --> <div class="searchform"> <form action="{{cgiwebpath}}/gm-comments.cgi" method="post"><div style="text-align:right;"><input type="text" name="gmsearch" size="20" class="text" /></div> <div style="text-align:right;"><input type="submit" value="Søk" class="button" /></div></form></div> <!-- searchform code end -->
Search item result template: <a href="index.php?filename={{pagelink}}">{{monthmonth}}/{{dayday}}/{{yearyear}}: {{entrysubject}}</a> <em>{{entrymainbodyfirstwords 20}}...</em>
search result page template: {{header}} <div class="path"><a href="index.php?filename={{pageindexlink}}" title="back to frontpage">Home</a> |AMP|raquo; search results</div><br /> <p> <strong>Search results for "{{searchterm}}" ({{searchmatches}} matches)</strong> {{searchresults}} [<a href="../../index.php?filename={{pageindexlink}}">Return To Main Index</a>] </p> {{footer}}
Calendar beginning: <!-- calendar code begin --> <table border="1" cellpadding="2" cellspacing="0" class="calendar"><tr><td align="center" colspan="7"><span style="font-weight:bold;">{{monthword}} {{yearyear}}</span></td></tr><tr><td align="center"><span style="font-weight:bold;">S</span></td><td align="center"><span style="font-weight:bold;">M</span></td><td align="center"><span style="font-weight:bold;">T</span></td><td align="center"><span style="font-weight:bold;">W</span></td><td align="center"><span style="font-weight:bold;">T</span></td><td align="center"><span style="font-weight:bold;">F</span></td><td align="center"><span style="font-weight:bold;">S</span></td></tr> <tr>
Calendar end: </tr> </table> <!-- calendar code end -->
calendar blank cell: <td align="center">|AMP|#160;</td>
calendar day cell without link: <td align="center">{{day}}</td>
day cell with link: <td align="center"><a href="index.php?filename={{pagelink}}">{{day}}</a></td>
day without link: [{{day}}]
day with link: [<a href="index.php?filename={{pagelink}}">{{day}}</a>]
popup code template: <a href="#" onmouseover="window.status='{{monthmonth}}/{{dayday}}/{{year}}: {{popuptitle}} (opens popup window)';return true" onmouseout="window.status='';return true" onclick="window.open('{{entrieswebpath}}/{{popuphtmlfile}}','{{randomnumber 1111-9999}}','width={{popupwidth}},height={{popupheight}},directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,screenx=50,screeny=50');return false">
popup window template: <html> <head> <title>{{monthmonth}}/{{dayday}}/{{year}}: {{popuptitle}}</title> </head>
<body bgcolor="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" onblur="window.close()">
<img border="0" src="{{entrieswebpath}}/{{popupfile}}" alt="{{popuptitle}}" height={{popupheight}} width={{popupwidth}}>
</body> </html>
|
|
|
Post by Carlos Phelps on Aug 24, 2007 8:32:57 GMT -5
I have found a problem with the gm-templates file.
I call it "White Noise," during the editing and saving of the templates file, white space is injected into the templates. This will cause the template file to grow in size, making saves and rebuilds to time out.
While I do not have a code fix yet, the quick fix is to open the gm-template.cgi file in a good text editor like Notepad++ then select View > Show White Space and TAB; remove any White Space or TAB before a Line Feed. Now save the file and rebuild.
Hope this helps, Carlos
|
|
|
Post by torkel on Aug 24, 2007 14:09:53 GMT -5
Works like a charm, thanks!
|
|
|
Post by Carlos Phelps on Aug 25, 2007 10:37:08 GMT -5
Update: I have a code fix for this problem. You will need to edit Gm_Utils.pm in the libs folder. Use a text only editor like Notepad++ for this. Locate sub toStoreSafe it should be near line 82. Replace sub toStoreSafe with the following code: rapiddialog.com/greymatter/codefix/1.7.3/WhiteNoise.txtNow save file and transfer to website in text only mode. Next time you open and save a template the "White Noise" will be gone and rebuilds will be faster.
|
|
|
Post by coldstone on Aug 29, 2007 23:37:12 GMT -5
Cool, good catch Carlos. I only notice it on empty templates on my local setup. Has anyone seen this on non-blank template items?
The weird thing about this, is that when you modify any templates, all the templates are actually hidden on the page. So even if you aren't modifying the Misc. Templates, they are hidden on the page and passed to gm.cgi when the templates are saved, so I would expect this to happen on Template save, not just a specific one.
torkel: Can you provide some more information regarding this issue? Which Misc. Template has the whitepace buildup? Were you able to modify and alter other templates?
|
|