"et al" is now added to all author lines

Events happening in the community are now at Drupal community events on www.drupal.org.
Scout's picture

Hi Everybody-

I'm really greatly looking forward to D7 version of OP. I've been following these discussions and will chime in at some point. In the meantime, I'm having a strange problem.

In the byline for all articles, blogs, etc., the name of author appears but so does "et al" -- I don't know why that is, or when it started showing this.

Any thoughts? I did not do anything and the site has been dormant since summer.

Thanks for your help.

Comments

I figured it out on my own.

Scout's picture

I figured it out on my own. I'm not a super user, just a "barely" user. Thanks again in any case!

For people who might in the

akanik's picture

For people who might in the future have the same question, would you mind explaining what was going on, and possibly how you fixed/changed it? It is frustrating to do a drupal search, think you have found what you are looking for, only to see that the issue was resolved with no explanation on how!

Thanks so much.

I recall that at some point

stattler's picture

I recall that at some point after I updated the Views module, the et al started to show up. I might be wrong. But I would also like to know how to fix that. I did not get enough time to search for a solution. Thanks in advance.

The et al. is Openpublish's

akanik's picture

The et al. is Openpublish's way of dealing with a multiple value author field. I suspect that the et al. is showing up only on the articles or blog views, and not on the actual article or blog nodes. I think Openpublish does it that way because they didn't want to deal with the grammatical issues that arise when you have multiple authors (that is, if there is one author - print $author1, if there are two authors - print $author1 . '&' . '$author2', if there are three authors - print $author1 . ',' . $author2 . '&' . $author3, and so on). I would think they would also want to shorten the byline to one author plus et al. to keep the length of the byline down in the views.

How do you change this setting? If you go into your article or blog view, you will notice that there are twp Author(s) Node: Title fields. One set normally to print the field it says it should, the other is set to print #MULTIPLE#. If you look under Relationships, you will notice there are also two author references there. One references delta 1, the other delta 2. Then, if you look in your modules folder under openpublish_features/op_article/includes/theme.inc (sites/all/modules/openpublish_features/op_article/includes/theme.inc) you will see that constant #MULTIPLE# defined and some other fields 'title_1' and 'title_2' referenced.

To put that last paragraph in human-readable terms:
the file sites/all/modules/openpublish_features/op_article/includes/theme.inc states that if

(1) there is a view called "articles",
(2) the field 'title_2' (which is our second author field in the view) is not empty
(3) that the field 'title_2's value equals the established constant 'OP_ARTICLE_MULTIPLE_AUTHORS' (this constant is defined as #MULTIPLE#, the value we saw in our view)

then field 'title_1' (which is our first author field in the view) should print the value of itself + a non-breaking whitespace + the text 'et al.'

That took me a while to to figure out, but I have all the code annotated, so if you have any questions about this feel free to ask!

Thanks, this is correct (in

Scout's picture

Thanks, this is correct (in views and not on node itself) as far as my experience goes. Thanks for writing this out, as I was able to fix it but explain it would take some doing. There are aspects of this I do not understand still, so I'll review your description and make sure I do understand it.

Thanks for explaining it. By

stattler's picture

Thanks for explaining it.

By the way, what is the solution? If there is only one author, and still it is showing et al, how to fix that?

I would take a look in your

akanik's picture

I would take a look in your theme.inc file at sites/all/modules/openpublish_features/op_article/includes/theme.inc. If you are running openpublish for drupal 6, there should be code that looks like this on line 15:

<?php

if (!empty($vars['fields']['title_2']) && $vars['fields']['title_2']->content == OP_ARTICLE_MULTIPLE_AUTHORS) {
   
$vars['fields']['title_1']->content .= '&nbsp;' . t('et al.');
    unset(
$vars['fields']['title_2']);
  } 
?>

This chunk of code basically states that if the field with machine name "title_2" is not empty and the content of "title_2" is equal to "OP_ARTICLE_MULTIPLE_AUTHORS", then make the field "title_1" equal itself + a non-breaking whitespace + the text "et al.".

If you are still getting the et al. when you only have one author, either the code is wrong there, or there is something screwy going on with your view. Make sure the code is correct and then check your articles view. Are your relationships referencing the correct deltas? One of the Content: Author relationships should reference delta 1, the other should reference delta 2 (maybe called Content: Author Counter). Also under fields, When you click on the Node: Title field that uses that Author Counter relationship, you should see that the output of that field is set to rewrite to #MUTLIPLE#. And no, I didn't misspell that. M-U-T-L-I-P-L-E.

If all of those things are correct, they views might think that there are two authors. I suggest using Devel (get this if you don't already have it) to look behind one of your article nodes. Once devel is installed and activated, you should see a new tab near the edit tab of each node that says "devel". If you click this and then click into the (object)stdClass it will show you a lot of info about the node: its nid, its create date, its version number, and some valuable information about its fields. Navigate to the field_op_author and click into that. You will be able to see if it has more than one value.

If your code is correct, the view is correct, and your node is only registering one field_op_author value.... well I'm not sure!

I appreciate your time and

stattler's picture

I appreciate your time and eagerness to help.

Unfortunately, everything looks as you've mentioned' still I see et al. on the frontpage blocks where there is only one author.

Historically, there was no problem until I updated the views module recently. That means, there should not be any problem with the theme.inc file (I've reconfirmed that).

Since the et al thing is causing problem only on frontpage, I strongly believe that its something to do with views.

Here is what is in my article views:

Relationship:
Content: Author(s)
Content: Author(s)

Fields:
among others...
(Author(s)) Node: Title
(Author(s) Counter) Node: Title Title

Now, under the relationship group, the first line (Content: Author(s)) is simple. But the second line (Content: Author(s)) has a field with "Do not use a relationship". I am not sure if that is what it should be.

I believe the [(Author(s) Counter) Node: Title Title] should be related to [Author(s) Counter], and it is.

And lastly, the devel shows only one element where there is one author, and two elements for two authors.

Therefore, I want to copy what you said, "..I'm not sure" what's causing the problem,

Which version of OpenPublish are you using?

Danielle Sheffler's picture

@Scout, are you seeing this in OpenPublish for D6 or the alpha of D7? I wasn't completely sure from your initial post, so if you could please let me know, I would appreciate it!

Danielle, sorry I did not see

Scout's picture

Danielle, sorry I did not see this until now. I have not yet installed D7 alpha yet. I am not Drush-handy yet, and last I checked that was required. In any event, I am not having the problem anymore but only because I disabled it in views.

I am eager to see a D7 version of OP and am hesitant to put too much time into my site until it's clear what is happening. Once something is released that I can test, I will install and start over... I'm hesitant to bring my people in to the site when it's not clear whether we'll have to start over soon anyhow.

thanks for the help and the investment in this forum.

Drush not required

Danielle Sheffler's picture

Scout, sorry, I must have missed the line about thinking that Drush is required. it's not. We have both tar and zip formats available on both the OpenPublish project page and http://www.openpublishapp.com/download.

thanks

Scout's picture

Danielle, I'll download the D7 version and try again. I'm eager to move forward, so perhaps this is a good opportunity for me to start over. I'll leave my D6 install up but would like to leave it behind moving forward.Thanks again.

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: