News Style problem after upgrade to 1.25

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Postby Masterplumber » Mon Mar 05, 2007 1:40 pm

I downloaded the zipfile to my linux desktop and uploaded from there. Might try the windoze route and see if that makes a difference?
Masterplumber
 
Posts: 14
Joined: Mon Feb 12, 2007 11:28 am

Postby Spunkmeyer » Tue Mar 06, 2007 5:36 pm

Well, concerning my issue, I'm running the following addons (could any of the following be the cause of the problem? some kind of incompatibility?):

ChangeDateNew (v3.5.6)
ezStats (v0.94)
Feed Builder (v0.06a)
iSay (0.16a)
Maginot (Build 17)
NewsCounter (v0.4)
Snipper (v1.01)

I'm sure they're all running fine, but I thought I would post them just in case anyone had any ideas. I thought for a second I forgot to upload the files in ASCII, but I double checked and they were :/
"God Bless the Portable Grassy Knoll"
Spunkmeyer
 
Posts: 69
Joined: Wed Jan 10, 2007 4:36 pm
Location: Whistler, BC, Canada

Postby Lumberjack » Sat Mar 17, 2007 10:54 am

Oops, I should have seen this before posting this:
Having now upgraded to 1.25 on my live sites, I notice that an attempt to edit a style causes a fatal error, and this is due to <If> tags being saved into crcfg.dat subroutines instead of being converted to perl as they should be. Did something get disabled?

I've had a quick look through the core and it seems fine, so I can't think why this is happening. But if you look at the styles with <If> in crcfg.dat after saving, the <If> tags are not being translated to perl..

Hmm, there's no difference in the subroutines involved between 1.24 and 1.25, that I can see. They are in cradmin.pl. The only thing I can think is that something has been changed in 1.25 that is stopping this from working properly, but I can't think what.
Lumberjack
 
Posts: 555
Joined: Wed Jan 10, 2007 7:22 pm
Location: Oxford, UK

Postby SrNupsen » Sun Mar 18, 2007 4:29 pm

SrNupsen wrote:Would be very interesting to know what's causing this - as we have most users (myself included) upgrading from 1.24 -> 1.25 without problems, it's hardly a general problem.


I would like to verify this bug. My 1.25 installation is not capable of handling styles with eq or == in them, allthough they work fine in 1.24

Lumberjack, any changes in 1.25 that could cause this? Anything at all?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby SrNupsen » Sun Mar 18, 2007 11:21 pm

Lumberjack; I think I have this one pinned down. I ran a diff between cradmin.pl versions 1.24B and 1.25, and it seems there are spaces inserted at some crucial points in the Styletoperl sub (inside cradmin.pl)

Experimenting with removing spaces, I now managed to get the example from style documentation to work:

Code: Select all
 <If: Field: User eq "Guido">
 I've always loved the name Guido.
 <If: Else>
 Your name, is, unfortunately, <Field: User>. Try Guido instead.
 </If>


This should prove I'm on the right track. However, using == instead of eq still doesn't work, but I bet there's a line somewhere I didn't think of. It's late now and I have to go to bed, but I think I'll be able to sort this out. However, for now good people, if you are in haste:

Download my cradmin.pl and replace your cradmin.pl with it (NB! THIS IS 1.25 VERSION DO NOT USE WITH PREVIOUS VERSIONS!!!)

...if you are afraid, do a backup first...

...and remember to use eq and not == in your style. The result will ofcourse be the same.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Jackanape » Mon Mar 19, 2007 12:09 am

This is interesting, and I hope it leads to the bottom of everything. On Lumberjack's request, I attempted to recreate the bug on my upgraded version, to no avail. I have no problem with <if> styles.

Is it possible, somehow, that this only occurs to some users on some servers?? Or, a conflict with an addon?
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby SrNupsen » Mon Mar 19, 2007 9:18 am

Just checking, Jack: You are aware that simple If statements aren't affected? It is only those of type <If: Field: Whatever eq "blah"> that don't work...
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Jackanape » Tue Mar 20, 2007 11:59 am

ahhh, no. I just ran a simple if statement through to check it out...
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby SrNupsen » Tue Mar 20, 2007 2:57 pm

OK, why don't you try with the example from the styles documentation

Code: Select all
 <If: Field: User eq "Guido">
 I've always loved the name Guido.
 <If: Else>
 Your name, is, unfortunately, <Field: User>. Try Guido instead.
 </If>


...just to see if you experience the same problem?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Dalponis » Tue Mar 20, 2007 5:42 pm

Yeah... In 1.24:

Code: Select all
<If: Field: User eq "Guido">
I've always loved the name Guido.
<If: Else>
Your name, is, unfortunately, <Field: User>. Try Guido instead.
</If>


worked. It does not in 1.25. I have no idea why. I tried "=", "=="...

Sure can't wait for SrNupsen's solution.
Dalponis
 
Posts: 45
Joined: Mon Mar 05, 2007 11:22 pm

Postby SrNupsen » Tue Mar 20, 2007 7:32 pm

I'm stuck.

As I said, I made the eq operator work, so I am able to use things like

Code: Select all
<If: Field: CustomField_photo eq "No">


in my styles. If, however, I put:

Code: Select all
<If: Field: CustomField_photo == "No">


then it gives me a syntax error for my style. I also get a headache from looking at the regexes inside cradmin.pl.

Parahead, do you have any idea what is happening? I tried a diff between 1.24 and 1.25 versions of cradmin.pl, which revealed some whitespace has been removed, and some added. Is this crucial?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Dale Ray » Wed Mar 21, 2007 6:05 am

SrNupsen wrote:I'm stuck.

As I said, I made the eq operator work, so I am able to use things like

Code: Select all
<If: Field: CustomField_photo eq "No">


in my styles. If, however, I put:

Code: Select all
<If: Field: CustomField_photo == "No">


then it gives me a syntax error for my style. I also get a headache from looking at the regexes inside cradmin.pl.


Are those two comparisons equivalent? I thought eq was for text and == for numerical comparisons. Will:
Code: Select all
<If: Field: CustomField_yourfield == 0>

work? (Assuming that the field you want to test has numerical content)
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby SrNupsen » Wed Mar 21, 2007 9:23 am

:oops:


What a geek. Ofcourse. Well, we can assume it works now, then. And everybody having trouble can download the cradmin.pl I posted above.


Lumberjack, could you include the fix in the current release (doesn't really qualify for a new version number...)
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Dale Ray » Wed Mar 21, 2007 12:46 pm

SrNupsen wrote:Lumberjack, could you include the fix in the current release (doesn't really qualify for a new version number...)


The version number should be changed, at least slightly, to make it easier for users to verify that they have the correct release. So it would be 1.25.1 to indicate a minor fix.

We should also get verification from some of the people reporting problems that this does work for them.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby SrNupsen » Wed Mar 21, 2007 2:32 pm

OK. I would also feel more comfortable if someone with at least 1% perl knowledge had a look as well.

Dale, or anybody: If you want to compare the 1.24B and 1.25 versions of cradmin.pl, I've packaged them here:

http://www.dusj.no/filer/cradmin.zip


ALSO: If making a new release, please correct the fact that in 1.25, the zip unpacks to Coranto_v1.25/Coranto_v1.25/ (that's one too many).
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

PreviousNext

Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron