Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2011, 02:30 PM   #1
sfuller
Member
sfuller began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Device: kindle
Template error value:unknown field null

I have a custom column that is broken in 8.5. The template is {tags:contains(fiction,AF,{null})}. I've had that column for a long time--has there been a syntax change?
sfuller is offline   Reply With Quote
Old 06-13-2011, 02:44 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
No, no syntax changes, but yes, better error reporting.

There is a long-term bug that permits templates to be (sometimes) executed inside templates. You have been tripping over this bug, where {null} appears to be a template accessing the field named "null". There is no such field. I haven't fixed this bug because it could be considered a feature.

Another bug permitted use of bogus field names. That bug has been fixed, now reporting the error instead of doing something else. In your case, the 'something else' was probably returning the word "null". If that is what you want to happen, remove the {} around the word "null". If you want something else to happen, then change the template appropriately.
chaley is offline   Reply With Quote
Advert
Old 06-13-2011, 02:54 PM   #3
sfuller
Member
sfuller began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Device: kindle
I want the value to be AF or blank. I was using this from the manual as a guide--In a plugboard, you can set a field to empty (or whatever is equivalent to empty) by using the special template {null}. This template will always evaluate to an empty string.
sfuller is offline   Reply With Quote
Old 06-13-2011, 02:59 PM   #4
sfuller
Member
sfuller began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Device: kindle
Fixed--I thought I needed a text if not match field from "contains(val, pattern, text if match, text if not match)". I just left the second parameter blank and the column is working.
sfuller is offline   Reply With Quote
Old 06-13-2011, 03:02 PM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thanks for pointing out the error in the documentation. I have no clue why I wrote that back in September of last year. If {null} ever worked, then it was by accident. I will fix the doc.

Your solution is the correct one -- leave the parameter empty.
chaley is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
v8.4 template error cybmole Calibre 5 06-04-2011 11:10 AM
Bargain Kindle (or Free Kobo) Book: Null Pointer Loosheesh Deals and Resources (No Self-Promotion or Affiliate Links) 8 05-08-2011 09:22 AM
Search Replcae error on custom field adept22 Library Management 4 03-14-2011 09:47 AM
Unknown - Unknown DaleDe EPUBReader 2 02-11-2010 10:57 AM
Newbie question for Calibre: "Unknown Book Type" error rvdparis Calibre 8 04-28-2009 04:20 AM


All times are GMT -4. The time now is 07:45 PM.


MobileRead.com is a privately owned, operated and funded community.