OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Google Scholar URL Problem

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Google Scholar URL Problem

Postby garde » Thu Sep 28, 2006 5:31 pm

Hi,

my Google Scholar Plugin can be accessed from:
http://www.****/gateway/plugin/GoogleScholarPlugin

In that file it links to http://www.****/gateway/plugin/plugin/G ... arPlugin/1

Code: Select all
<metadata-files>

   <file>

   <url>
http://www.****/gateway/plugin/plugin/GoogleScholarPlugin/1
</url>
</file>
</metadata-files>
</publisher>


and I believe there is an extra "plugin" in the path that shouldn't be there.
This maybe due to line 145ff in the GoogleScholarPlugin.inc.php?

Code: Select all
Request::url(null, null, null, array(
            // IS THIS LINE NEEDED?   'plugin',
               $this->getName(),
               $i
            )),
            true
         );



Kind regards
Sebastian
garde
 
Posts: 17
Joined: Thu Mar 16, 2006 12:16 am

Postby asmecher » Fri Sep 29, 2006 3:05 am

Hi Sebastian,

Thanks for pointing this out; your fix is correct. See http://research2.csci.educ.ubc.ca/cgi-bin/cvsweb/ojs2/plugins/gateways/googleScholar/GoogleScholarPlugin.inc.php.diff?r1=1.4;r2=1.5 for a patch against OJS 2.1.1.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm

Postby garde » Thu Nov 23, 2006 3:39 pm

Dear Alec,

Google Scholar requested the following to get listed in Google Scholar:

Hello Sebastian,

Thanks for following up. Our engineers tried to add your sitemap to the crawl but there was one last issue:

You are pointing us to a framed version of the content, such as:
http://www.ejhi.net/ojs/index.php/ejhi/article/view/3.

Can you please use the alternate url for non-framed version
(eg: http://www.ejhi.net/ojs/index.php/ejhi/ ... wArticle/3).

Please let us know if that's possible.

Sincerely,

The Google Scholar Team


I therefore changed my code to the following (line 253ff in GoogleScholarPlugin.inc.php, simply change 'view' to 'viewArticle' twice):

Code: Select all
XMLCustomWriter::setAttribute($canonicalUriNode, 'xlink:href', Request::url(null, 'article', 'viewArticle', array($publishedArticle->getArticleId())));
XMLCustomWriter::appendChild($articleMetaNode, $canonicalUriNode);
foreach ($publishedArticle->getGalleys() as $galley) {
   $galleyUriNode =& XMLCustomWriter::createElement($document, 'self-uri');
   XMLCustomWriter::setAttribute($galleyUriNode, 'xlink:href', Request::url(null, 'article', 'view', array($publishedArticle->getArticleId(), $galley->getGalleyId())));
   XMLCustomWriter::appendChild($articleMetaNode, $galleyUriNode);
}


Regards
Sebastian
garde
 
Posts: 17
Joined: Thu Mar 16, 2006 12:16 am

Postby asmecher » Thu Nov 23, 2006 4:10 pm

Hi Sebastian,

Thanks, we'll include this in the next release.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests