[CWB] CQPweb: metadata fields not visible after update

Hardie, Andrew a.hardie at lancaster.ac.uk
Wed May 28 00:33:07 CEST 2014


OK, I think I see the problem. 

I have corrected this in the code tree. But you may not want to update just now as it is half-and-half between v 3.1.7 and 3.1.8. So, as a stopgap, I suggest the following fix:

Open the file "lib/metadata.inc.php"

Go to line 514

It should look like this:
	return (empty($obj) ? $field : $obj->description);

Change it to:

	return (empty($obj) ? $field : (empty($obj->description) ? $field : $obj->description));

That should make the field handle appear when, as in your database, the field description is empty.

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Noah Bubenhofer
Sent: 26 May 2014 11:48
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] CQPweb: metadata fields not visible after update

Hi Andrew,

sorry, I was busy the last days an not able to further investigate on the issue. But now:

Am 20.05.2014 um 18:39 schrieb "Hardie, Andrew" <a.hardie at lancaster.ac.uk>:

> I can't reproduce this on my setup. Could you look at:
> 
> 1 - does it affect all corpora or just some?

Yes, all corpora are affected.
> 
> 2 - what is present in the underlying database? (The MySQL table you want is text_metadata_fields_).

The tables seem to be here -- just a small extraction:

| text_metadata_fields                       |
| text_metadata_for_alternative              |
| text_metadata_for_arstechnica              |
| text_metadata_for_bild                     |
| text_metadata_for_bildtest                 |
| text_metadata_for_bioethik                 |
| text_metadata_for_btpi                     |

And here an extraction from text_metadata_fields:

mysql> select * from text_metadata_fields;
+----------------------+----------------------+-------------+-------------------+
| corpus               | handle               | description | is_classification |
+----------------------+----------------------+-------------+-------------------+
| alternative          | text_abstract        |             |                 0 |
| alternative          | text_author          |             |                 0 |
| alternative          | text_date            |             |                 1 |
| alternative          | text_doctype         |             |                 1 |
| alternative          | text_function        |             |                 1 |
| alternative          | text_party           |             |                 1 |
| alternative          | text_place           |             |                 0 |
| alternative          | text_title           |             |                 0 |
| alternative          | text_url             |             |                 0 |



> 3 - what exactly appears when you go to the text metadata page? (i.e. any of the links attached to a text ID in the concordance display)

The table shows as many rows as meta data fields are available in the corpus. The first column shows only "Text identification label", followed by empty rows. The last row then shows "No. of words in text". In the second column all metadata is showed correctly. 

Best,
Noah



> 
> best
> 
> Andrew.
> 
> -----Original Message-----
> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Noah Bubenhofer
> Sent: 20 May 2014 15:46
> To: CWB at sslmit.unibo.it
> Subject: [CWB] CQPweb: metadata fields not visible after update
> 
> Hi everybody,
> 
> after updating CQPweb from 3.0.7 to 3.1.7, the metadata labels have been lost: The metadata content is present (e.g. if you show the metadata information in the kwic list), but there are no labels shown. The field labels are just blank. This is also the case for other locations in the interface where the labels are normally present, e.g. on the page where subcorpora can be defined choosing the option "scan text metadata". Has anyone else seen this problem?
> 
> Best,
> Noah
> 
> 
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list