i installed the barcode module and cck module for its dependency. i created a new content type say "barcode". In this content type i filled the Name, type and description fields. In the widget type it was giving only text field. i set this field as text field. In the configuration of this content type under the display field tab i set the Barcode image as the teaser view and Full node view. but it is not showing the generated barcode image in the node view. while the barcode image is generated in the files/barcode directory.

Comments

chris.toler’s picture

I am having a similar problem (D6.19; Barcode 6.x.1.0-rc5).

I get only the "Text" widget type when adding the CCK field. Using EAN-13 or UPC-A, the generated "image" is just a series of numbers, without the actual barcode.

sergiu.popa’s picture

Same problem here (D6.20, 6.x.1.0-rc5).

The image is generated and it's in the right folder. However, the problem is with the relative path to the image. It's not correct. Because of this, the image is not shown. I think it should be an absolute path.

Example: src="/sites/default/files/barcodes/723372353EAN-13.png" (this while I'm viewing /node/2).

RuiMendes’s picture

same problem here. Any solution?

sergiu.popa’s picture

After line 164 ($path = variable_get.....) I declared global $base_url and used it:

global $base_url;
     if (!empty($element['#item']['title'])){
        return '<img src="'.$base_url.'/'.$filename.'" alt="'.$element['#item']['barcode'].'" /> -- '.$element['#item']['title'];
     }else return '<img src="'.$base_url.'/'.$filename.'" alt="'.$element['#item']['barcode'].'" />';

It works for me. I'm new to Drupal coding so I don't know if this is the proper solution. Give it a try though!

hedac’s picture

I had the same problem.. but I am trying v2 dev now. and it works :)

dancruiser’s picture

It is caused by the private file system.
You can modify theme_barcode_formatter_default($element) in barcode.module.

skyredwang’s picture

Status: Active » Closed (won't fix)