[ad_1]
Hi Roland,
I have had one of my customized templates break in the upgrade to 2.4. It is also broken in 2.4.1.
The “a” tag within the loop displaying each field for the pdb-list view is somehow being mangled.
To illustrate the problem I started with the pdb-list-default.php template and created a custom template called pdb-list-customTest.php the only change I made was to change line 71-74 from:
<td class="<?php echo $this->field->name() ?>-field">
<?php $this->field->print_value() ?>
</td>to:
<td class="<?php echo $this->field->name() ?>-field">
<?php if ($this->field->name() <> 'recordlink') : ?>
<?php $this->field->print_value(); ?>
<?php else : ?>
<a href="javascript:alert('star clicked')" class="dashicons dashicons-star-filled" style="text-decoration: none;"></a>
<?php endif ?>
</td> The shortcode on the page which invokes this template is:[pdb_list template="customTest" search="true" sort="true" suppress=true search_fields="artist,title" default_search_field="title" orderby="title,artist,label" fields="artist,title,label,songlength,song_id,recordlink" list_limit="50" display_count="true"]
Clicking the star icon generates an javascript alert box in 2.3.4 and earlier. In 2.4 and later it becomes a hyperlink. I’m not sure what is happening here.
Here is a test page where you can see it working properly on 2.3.4. I’ve currently blocked updates for the plugin to stop it automatically updating to 2.4.1
PDB List Test. Do a search for “Beatles” (Title or Artist it doesn’t matter). And click the star.
Thanks for any help you can provide.
