I'm trying to create a taglist and a I get Taglist could not be saved.

drupal 6.14

Comments

dagdag’s picture

This problem also can be related to a configuration problem, in the tagoptions settings at choose content (content) that seems to manage the access to content
as

[#id:content]

it generates an error and doesn't show the content, the error is as

Value 1 of field field_all_publications of node 94 not found or has no content and hence cannot be embedded. Create content for that field or revise the Linodef tag which contains #94:field_all_publications:1.

so i do not what is wrong, i start to use the rc3 version and it does well. if I disabled this option I only see the title to the content. This field is a computed field that was working with rc3 version. Though I didn't test enough this problem can be present also in the rc4.

Another thing is that the links to the help seem to have been disabled.

Roi Danton’s picture

Title: Taglist could not be saved. » Taglist could not be saved and usage of option content/contentvalue.
Category: bug » support

Taglist

I'm trying to create a taglist and a I get Taglist could not be saved.

Please provide more information. What you have chosen for objecttype, sourcetype, source and options? Does this problem occurs if you select a different sourcetype? If you installed rc4 before then make sure to uninstall Linodef taglists (/admin/build/modules/uninstall) before installing rc5 since rc4 had a critical bug in its database scheme which prevented taglists from being saved.

Option content and tagoptions configuration

This problem also can be related to a configuration problem, in the tagoptions settings at choose content (content) that seems to manage the access to content

No, the problem above is unrelated to the tagoptions configuration since it is applied only when the filter is invoked (when viewing/previewing a node). The option content allows to select certain elements from an object, e.g. a field from a node, the title from a view etc. Therefore ...

if I disabled this option I only see the title to the content.

... when "content" is disabled the field selection inside the tag is ignored and the node title appears - as if you had entered #94: comment.module: move new comment mark (red asterix) to theme instead of [#94:field_all_publications] (which is similar to [#94,content="field_all_publications"]). druppi was so kind and has added some examples to the tagoptions documentation page.

Option contentvalue

This field is a computed field that was working with rc3 version.

Please make sure that [#94:field_all_publications:1] really worked with rc3 because it seems as your computed field isn't a multiple value field or the second value in node 94 has not been set for the computed field. If the computed field only has one value the tag should be [#94:field_all_publications] instead of [#94:field_all_publications:1]. See option contentvalue: [#94:field_all_publications:1] or [#94:field_all_publications,contentvalue="1"] requests the second value of field_all_publications in node 94.

Another thing is that the links to the help seem to have been disabled.

Yes, the advanced help files have been disabled since there is no time to update both the documentation at drupal.org and inside the Linodef package for every rc release. Please stick to the drupal.org documentation meanwhile.

dagdag’s picture

Hi Roi thank for your faster answer!

respect to the first question, yes I was trying the different options and the different kinds of source types give this error! I have not tested all options but I think that I have made the test with the default values of taglist creation and the result was that the taglist couldn't be saved.

in the second question when I was enabling/disabling the content check box the error was gone but only the title was shown (here i test enabling all the other checkboxes except the content).

And in the third question yes I test it with rc3 and in the code above I have paste the [#94:field_all_publications:1]. entry to show the error but i have around 103 values in the computed field that was working with rc3 version(Howewer I only test about 20 entries and it was working), also when i have updated from rc4 to rc5 I have disabled the rc4 and I have deleted the folder before install the rc5 version. and I saw this problem with rc4 and then today I see the rc5 and I have though that this was a solution for that.

Roi Danton’s picture

also when i have updated from rc4 to rc5 I have disabled the rc4 and I have deleted the folder before install the rc5 version. and I saw this problem with rc4 and then today I see the rc5 and I have though that this was a solution for that.

Disabling and deleting the folder isn't enough unfortunately. The Linodef table has to be deleted. Therefore the module has to be uninstalled after disabling and before deletion by going to /admin/build/modules/uninstall (you don't need to install rc4 for this, deinstalling rc5 helps, too). I have added this note to the release notes.

yes I test it with rc3 and in the code above I have paste the [#94:field_all_publications:1]. entry to show the error but i have around 103 values in the computed field that was working with rc3 version

Thanks for testing. This is odd, I can't reproduce that error on my test installation. What is the content of the computed field?

dagdag’s picture

The content of the computed field (it is not saved to the database) is a php code that read entries from a database in mysql, this generates entries that contain references to documents as author, title, etc...

this is an extract of the part of code that generates the entries:


/*
  show all entries for this search word ordered in a particular scheme
  as showed below, not all fields are available for each publication.
  
  format: bibtexId, author, title, book title, edition, journal, editor, series, volume
          number, organization, publisher, in proceedings, school, address, chapter, page, month,
          year, type, how published, url, note
*/

while ($i < $num) {

  $current = $i + 1;
   
  if ($year_printed <> $year[$i])
    {
      $year_printed = $year[$i];
      $yearStr = "<b> $year_printed </b><br>";
      
     } else{
      $yearStr = "";
     }
  //$query = "SELECT * FROM ref_docfields WHERE doctype_id = '$doc_type' "; 
  $query = "SELECT * FROM ref_fields ORDER BY d_order ASC ";
  $doc_typeQuery2 = mysql_query($query);
  //  get number of registers or rows equivalent to doc parameters
  $doc_parameters = mysql_numrows($doc_typeQuery2);
  
  $j=0;
  
  while($j < $doc_parameters){
    
    //$parameter[$j] = mysql_result($doc_typeQuery2,$j,"field_id");
    $parameter[$j] = mysql_result($doc_typeQuery2,$j,"id");
    //echo "$j <br>";
    //echo "$parameter[$j] <br>";
    //echo "$doc_id <br>";
    
    $query = "SELECT data FROM docdata_tbl WHERE field_id = '$parameter[$j]' AND doc_id = $doc_id[$i] "; 
    $doc_Query = mysql_query($query);
    
    $doc_row = mysql_fetch_row ($doc_Query);
    $doc[$j] = $doc_row[0];
    if($doc[$j])
      {
                
       switch($parameter[$j])
        {
          case "bi":  //bibtexid
          
              $bibtex = $doc[$j];
              
            break;
          case "au":  //author
              
              //echo "bibId: $bibtex temp: $temp<br>";
              
              //  check if earlier bibtex is the same, it means that
              //  the entry doesn't have a bibtex ID, if temp and bibtex 
              //  variables are different, then there is a  new bibtex entry
              if ($temp == $bibtex){
                  $bibtex = "";
                  $bibtexRef = "[<font color=\"RoyalBlue\">$bibtex</font>] ";
                  //echo "$bibtex is equal to $temp<br>";           
               }else{
                  //echo "$bibtex different to $temp<br>";
                  $temp = $bibtex ;  
                  $bibtexRef = "[<font color=\"RoyalBlue\">$bibtex</font>] ";
                  //echo "final value of temp: $temp<br>";
               }
                $strVar = $bibtexRef."<b>$doc[$j]</b> "; 
                $author = true;
                          
            break;
          case "ti":  //title
              if($author == false){
                $strVar = "[<font color=\"RoyalBlue\">$bibtex</font>] ".$doc[$j]."." ; 
              }else{
                $strVar = $strVar."$doc[$j]. "; 
                $author = false;
              }
                        
            break;
          case "bt":  //booktitle
              $strVar = $strVar."<i>$doc[$j]</i>, ";             
             
            break;
          case "en":  //edition
              $strVar = $strVar."$doc[$j], ";             
              
            break;
          case "jn":  //journal
              $strVar = $strVar."$doc[$j], ";             
              
            break;
          case "ed":  //editor
             
              $strVar = $strVar."In $doc[$j] editors, ";             
              
            break;
          case "se":  //series
          
              $strVar = $strVar."<i>$doc[$j] series</i>, ";             
            
              
            break;
          case "vo":  //volume
          
              $strVar = $strVar."volume $doc[$j], ";             
              
            break;
          case "no":  //number
          
              $strVar = $strVar."number $doc[$j], ";             
             
            break;
          case "og":  //organization
              $strVar = $strVar."$doc[$j], ";             
              
            break;
          case "pu":  //publisher
              $strVar = $strVar."$doc[$j], ";             
             
            break;
          case "in":  //in proceedings
              $strVar = $strVar."$doc[$j], ";             
             
            break;
          case "sh":  //school
              $strVar = $strVar."$doc[$j], ";             
              
            break;
          case "ad":  //address
              $strVar = $strVar."$doc[$j], ";             
             
            break;
          case "ca":  //chapter
              $strVar = $strVar."$doc[$j], ";             
             
            break;
          case "pg":  //pages
          
              $strVar = $strVar."pages $doc[$j], ";             
             
            break;
          case "mo":  //month
              $strVar = $strVar."$doc[$j] ";             
            
            break;
          case "yr":  //year
              $strVar = $strVar."$doc[$j] ";             
             
            break;
          case "ty":  //type
              $strVar = $strVar."$doc[$j], ";             
              
            break;
          case "ho":  //howpublished
              $strVar = $strVar."$doc[$j] ";             
              
            break;
          case "ur":  //url
              $strVar = $strVar."$doc[$j] ";             
            
            break;
          case "nt":  //note
              //$strVar = $strVar."<font color=\"Red\">note: [$doc[$j]] </font>";             
              
            break;
            
          default:  // other case
            break;
         } 
             
      }
    
    $j++;
    
  }
  
  ... some code here 
  
  //  translate characters in the text of entries from database
  $filter = array("\'i"=>"í","\'a"=>"á","\'o"=>"ó","\'e"=>"é","\'u"=>"ú","\'{a}"=>"á","\'{e}"=>"é","\'{i}"=>"í","\'{o}"=>"ó","\'{u}"=>"ú");
  $strVar = strtr($strVar,$filter);
  $entry = $yearStr."<ul><li>$strVar</li></ul>";
  
  $node_field[$i]['value']=html_entity_decode($entry);
  $i++;
}

I'll try to reinstall the rc5 version to test it again!

I have reinstalled but the taglist could not be saved problem continues...
the module doesn't appear on admin/modules/uninstall

maybe it is a problem of access to the database because it cannot write and cannot read from it! as in the taglist saving and in the computed field example.

Pepe Roni’s picture

You don't need to reinstall. Linodef seems to be able to use fields stored in the database only. I, too, can not use fields in the taglist editor, that are not stored in the database. Neither I can use these fields in views :(

But the good: linodef can embed fields that are not stored in the database! :)

Roi Danton’s picture

the module doesn't appear on admin/modules/uninstall

Just deactive Linodef taglists but don't delete the Linodef folder to being able to uninstall it.

Roi Danton’s picture

Component: Taglists (ex buttons API) » Code (general)
Status: Active » Fixed

Status changed. If problem isn't fixed reopen issue.

dagdag’s picture

Hi again,

I was trying to create the taglist several times but I cannot do it. Then I test to installing the linodef dev (31-dec) in another site that I manage and here it works!
so I presume that the problem was while updating from rc3 to rc4 and then to rc5, not sure.

In the updating case was not posible to write in the linodef table in the database in the updated module, so what i did was to copy the empty linodef_taglist table from the other site to the actual site that I am working and It starts to work.

Roi Danton’s picture

Good that it works for you now!

rc4 had a typo in its db scheme so the table was erroneous and taglists didn't work. Therefore it had to be uninstalled before upgrading to rc5 (otherwise rc5 would try to use the faulty db table as it was in your case apparently). As you overwrote the table you've done the uninstall and reinstall procedure in another way. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.