FATAL ERROR! (Bug regarding <If></If> - 1.23)

All notes and input on 2.0 Development are herein. <ul><li>Feature requests</li>
<li>Bug Reports</li>
<li>Beta Testing Feedback</li>
<li>Open Dev Discussion</li></ul>

Moderator: Coranto Moderator Team

FATAL ERROR! (Bug regarding <If></If> - 1.23)

Postby jayo » Thu May 20, 2004 10:08 pm

Yestersday, i upgraded to the 1-23 version..

Today I was trying to change a news style and I get this error:

Could not include file crcfg.dat. The file, however, appears to exist. This usually indicates some form of syntax error in the file. Message: Unmatched right curly bracket at crcfg.dat line 912, at end of line (Might be a runaway multi-line ~~ string starting on line 908)syntax error at crcfg.dat line 912, near "}"Compilation failed in require at coranto.cgi line 75.
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby cerberos76_ » Thu May 20, 2004 10:23 pm

looks like you might have a corrupted crcfg.dat (it happens every so often; it is not dependent on the change of version).

Find a backup for: crcfg.dat, test it and report if it is ok....Oherwise might be a bug in the upgrade script
Coranto addons:
* GuestPost, one click guestposting
* MoveIt!, Advanced Backup and site transfer
* PartialRebuild, CPU-friendly enhancement of FullBuild
* URLColumn, URLs for multiple Categories/Profiles
* Tickit!, Javascript News Tickers/Faders for Coranto!
* AddonEnabler, enables or disables single, multiple or all addons in one go
* SubmitMultiple, post consecutive news in an automatic loop!
* RSSAdvanced, RelatedNews ....

Get them at: http://coranto.gweilo.org/addons/
cerberos76_
 
Posts: 1339
Joined: Sun Mar 10, 2002 1:21 am

Postby jayo » Thu May 20, 2004 10:25 pm

cerberos76 wrote:looks like you might have a corrupted crcfg.dat (it happens every so often; it is not dependent on the change of version).

Find a backup for: crcfg.dat, test it and report if it is ok....Oherwise might be a bug in the upgrade script


WHeres a back up??

I read this in the change log of the new script:
- Fixed <If:> style saving bug ( Parahead: probably was a cut-paste error! :P )

Does that have anything to do with it?
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby jayo » Thu May 20, 2004 10:29 pm

<If: Field: Category eq "features">
<a href="http://www.mysite.com/features/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "(default)">
<a href="http://www.mysite.com/news/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "upandcoming">
<a href="http://www.mysite.com/underground/read.php?id=<Field: newsid>">more</a>
</If>


I removed this from the crcfg.dat file.. and it fixed it.. Whats the deal with this?? I need this little code for my search results.. why is it giving an error?
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby jayo » Thu May 20, 2004 11:05 pm

okay now its good, but that <IF> command doesnt work.. it gives this error:


Error: That style is invalid and has a syntax error. Check, in particular, that all ifs are properly matched and ended. Perl reported the following error, which may or may not be helpful: Unmatched right curly bracket at (eval 12) line 27, at end of line (Might be a runaway multi-line ~~ string starting on line 23) syntax error at (eval 12) line 27, near "; }"


Can anyone help?
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby bozoka45 » Fri May 21, 2004 2:33 am

Make sure you have an

Code: Select all
</If>


for every

Code: Select all
<If: Blahblabah>
.....
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby jayo » Fri May 21, 2004 2:37 am

<If: Field: Category eq "features">
<a href="http://www.mysite.com/features/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "(default)">
<a href="http://www.mysite.com/news/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "upandcoming">
<a href="http://www.mysite.com/underground/read.php?id=<Field: newsid>">more</a>
</If>


Is there some wrong with this?

I get this error:

Error: That style is invalid and has a syntax error. Check, in particular, that all ifs are properly matched and ended. Perl reported the following error, which may or may not be helpful: Unmatched right curly bracket at (eval 12) line 27, at end of line (Might be a runaway multi-line ~~ string starting on line 23) syntax error at (eval 12) line 27, near "; }"
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby Parahead » Fri May 21, 2004 5:52 am

jayo wrote:Yestersday, i upgraded to the 1-23 version..
And it is the 1.23 version available for download at http://corantobeta.gwe ilo.org that you upgraded to? Not an old copy of 1.23 or something? You see, there was a buggy 1.23 version out for a small period of time, read more about it in this thread. The original thread discussing the If-problem can be found here.

jayo wrote:
Code: Select all
<If: Field: Category eq "features">
<a href="http://www.mysite.com/features/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "(default)">
<a href="http://www.mysite.com/news/read.php?id=<Field: newsid>">more</a>
</If>
<If: Field: Category eq "upandcoming">
<a href="http://www.mysite.com/underground/read.php?id=<Field: newsid>">more</a>
</If>
Is there some wrong with this?
That part looks OK... You can use the If/Else-approach as well (which was one of the fixed If-statements in 1.23):
Code: Select all
<If: Field: Category eq "features">
<a href="http://www.mysite.com/features/read.php?id=<Field: newsid>">more</a>
<If: Else: Field: Category eq "(default)">
<a href="http://www.mysite.com/news/read.php?id=<Field: newsid>">more</a>
<If: Else: Field: Category eq "upandcoming">
<a href="http://www.mysite.com/underground/read.php?id=<Field: newsid>">more</a>
</If>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Parahead » Fri May 21, 2004 12:51 pm

OK, I have verified this bug now!

Anyway, the problem is that there is a space missing at the end of the line at certain places. If using 1.23 as reference, all the tags that are being affected is:
<If: Field: Name eq 'something'>
<If: Field: Name == something>
<If: Field: Name{"key"} == something>
<If: Sub: Name == something>
<If: Else: Field: Name eq 'something'>
<If: Else: Field: Name{"key"} eq 'something'>
<If: Else: Sub: Name eq 'something'>
<If: Else: Field: Name == something>
<If: Else: Field: Name{"key"} == something>
<If: Else: Sub: Name == something>

You fix this by adding a space at the end of each line looking like the one below for the tags stated. Using Coranto 1.23 as reference the line for you can be found in file cradmin.pl, line 1873:
Code: Select all
$style =~ s/<If:\ Field:\
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby jayo » Fri May 21, 2004 3:31 pm

Parahead wrote:OK, I have verified this bug now!

Code: Select all
$style =~ s/<If:\ Field:\


Where do I add the space, directly after the last \??

I did that and Im still getting this:

Code: Select all
Error: That style is invalid and has a syntax error. Check, in particular, that all ifs are properly matched and ended. Perl reported the following error, which may or may not be helpful: Unmatched right curly bracket at (eval 12) line 15, at end of line (Might be a runaway multi-line ~~ string starting on line 11) syntax error at (eval 12) line 15, near "; }"
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby jayo » Fri May 21, 2004 4:14 pm

OK I GOT IT!!!!! Thanks so much for your help!!!!!!!!!!! :D
No need for a SIG!
jayo
 
Posts: 104
Joined: Tue Mar 18, 2003 9:38 pm
Location: Los Angeles

Postby Parahead » Sun Jun 27, 2004 7:28 pm

jayo wrote:Where do I add the space, directly after the last \??
Yes, that is correct!

cerberos76, this thread is starting to be the source of how to fix the bug in 1.23, can´t we *please* see an officialy fixed version of Coranto instead?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Does this still exist in 1.24?

Postby pmulcahy » Fri Aug 20, 2004 12:46 am

Does this bug still exist in 1.24?

I ask because I tried upgrading to 1.23 and got the error. I never had time to fix it, but now I do. But I noticed that 1.24 was out so I just upgraded to that, thinking (silly me) that might fix the problem. But it didn't. I get the following:

USEFUL INFORMATION

Perl Version: 5.006001
Script Version: 1.24
Script Build: 39
Script RC: 0
Script URL: http://www.mulcahy.net/cgi-bin/coranto/coranto.cgi
@INC:
/usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i686-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
.
Script Location (Method 1): coranto.cgi
Script Location (Method 2): /home3/pmulcahy/mulcahy-www/cgi-bin/coranto

ENVIRONMENT VARIABLES
QUERY_STRING:
SERVER_ADDR: 216.147.95.105
HTTP_ACCEPT_LANGUAGE: en-us
SERVER_PROTOCOL: HTTP/1.1
HTTP_CONNECTION: Keep-Alive
REMOTE_PORT: 2029
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
GATEWAY_INTERFACE: CGI/1.1
HTTP_HOST: www.mulcahy.net
REMOTE_HOST: adsl-68-79-13-33.dsl.emhril.ameritech.net
SERVER_SOFTWARE: Apache/1.3.29 (Unix) ApacheJServ/1.1.2 PHP/4.3.4 mod_throttle/2.11 FrontPage/5.0.2.2634 Rewrit/1.1a
SERVER_ADMIN: webmaster@mulcahy.net
REMOTE_ADDR: 68.79.13.33
SCRIPT_NAME: /cgi-bin/coranto/coranto.cgi
HTTP_ACCEPT_ENCODING: gzip, deflate
SERVER_NAME: mulcahy.net
DOCUMENT_ROOT: /home/pmulcahy/mulcahy-www
REQUEST_URI: /cgi-bin/coranto/coranto.cgi
REQUEST_METHOD: GET
SCRIPT_FILENAME: /home/pmulcahy/mulcahy-www/cgi-bin/coranto/coranto.cgi
PATH: /usr/local/bin:/usr/bin:/bin
SERVER_PORT: 80

MESSAGE: Could not include file crcfg.dat. The file, however, appears to exist. This usually indicates some form of syntax error in the file. Message: syntax error at crcfg.dat line 333, near "} else" (Might be a runaway multi-line ~~ string starting on line 329)Compilation failed in require at coranto.cgi line 75.

---

So, if this is the problem:
(1) Why didn't the upgrade to 1.24 fix it? Did I just mess things up majorly by even trying 1.23 in the first place?

(2) I guess I don't get the solution. I checked in cradmin.pl, and there IS a space at the end of each line that looks like $style =~ s/<If:\ Field:\

Please tell me what I'm missing here. I hope it's just me being dense and missing the whole thing.

Thanks,
Pat
User avatar
pmulcahy
 
Posts: 157
Joined: Sat Mar 09, 2002 10:51 pm
Location: Illinois

Re: Does this still exist in 1.24?

Postby Parahead » Fri Aug 20, 2004 5:24 am

pmulcahy wrote:Does this bug still exist in 1.24?
No!


pmulcahy wrote:So, if this is the problem:
(1) Why didn't the upgrade to 1.24 fix it? Did I just mess things up majorly by even trying 1.23 in the first place?

(2) I guess I don't get the solution. I checked in cradmin.pl, and there IS a space at the end of each line that looks like $style =~ s/<If:\ Field:\

Please tell me what I'm missing here. I hope it's just me being dense and missing the whole thing.
The problem may be that you made a solution that worked with 1.23, but now when the bug is fixed in 1.24 it backfires... Can you get into Coranto or do you get this directly? If you can, go into the admin interface and open up each style and resave them, that way you will see which one it is that is screwed up...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby pmulcahy » Fri Aug 20, 2004 2:33 pm

Actually, I never made any changes in 1.23, I just never had time to do it.

But no, I can't get into Coranto at all. Guess I should have stayed away from 1.23, maybe it changed stuff I had been using all these years? I don't know. In any case, nothing seems to work at all any more.
User avatar
pmulcahy
 
Posts: 157
Joined: Sat Mar 09, 2002 10:51 pm
Location: Illinois


Return to Coranto 2.0 Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron