After upgrade from OJS 3.0.2 to OJS 3.1 no render link buttons of galleys

Hi everyone, I write this topic because I have an issue with the result of upgrade my OJS 3.0.2 to OJS 3.1.

I have a journal that was published since OJS 3.0.1, we have published some articles, then when PKP released the OJS 3.0.2 version, we upgraded our OJS 3.0.1 to 3.0.2. Now that PKP has released OJS 3.1, we have made the upgrade from OJS 3.0.2 to 3.1, and we have had a sucessful upgrade; however when I saw the site, I have noticed that some galley buttons doesn’t render for our articles published since the version 3.0.2, and our articles published since OJS 3.0.1 don’t have galley buttons neither.

In the view of Submission or Users, none render data. Can someone help me to correct this trouble?

It’s important to tell that the database is a clone from the database of OJS 3.0.2, and the files in the public directory and the uploaded directory are a true copy from the directories of my OJS 3.0.2.

Hi @juancure

Please, take a look in your php error log in your server, also check any message error in your browser console lo. Often it shows helpful information to debug issues.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi @israel.cefrin

Thanks a lot for your response. I have revised this topic https://forum.pkp.sfu.ca/t/ojs-3-1-wont-show-remote-galleys/34816/2, and I have realized that my particular situation is that when I created my galley’s some them were created as supplementary galleys, that’s the reason why no render in this new version of OJS 3.1 because in this version those kind of galleys are not visible in the article summary view.

I changed the following templates: templates/frontend/objects/article_details.tpl, templates/frontend/objects/article_summary.tpl and pages/article/ArticleHandler.inc.php
for there is not difference between the primary and supplementary galleys, as the ojs 3.0.2 and 3.0.1.

Hi @juancure

Hope you are well, I have a similar error in my OJS system, can you please share your solution so I will copy it?

Thanks

Hi @marcello8080

Well I have solved this in a tricky way.

I have realized that we created some galleys as supplementary, then when I upgraded our OJS to 3.1 version the supplementary galleys no are visible in the summary article view.

My solution was to modify the following templates templates/frontend/objects/article_details.tpl and templates/frontend/objects/article_summary.tpl to previous version of OJS 3.0.2, and I have changed in the

pages/article/ArticleHandler.inc.php file the following code:

foreach ($galleys as $galley) {
				$file = $galley->getFile();
				if (!$file) {
					continue;
				}
				if (in_array($file->getGenreId(), $primaryGenreIds)) {
					$primaryGalleys[] = $galley;
				} elseif (in_array($file->getGenreId(), $supplementaryGenreIds)) {
					$supplementaryGalleys[] = $galley;
				}
			}

for the following code

foreach ($galleys as $galley) {
				$file = $galley->getFile();
				if (!$file) {
                   $primaryGalleys[] = $galley;
					continue;
				}
				if (in_array($file->getGenreId(), $primaryGenreIds)) {
					$primaryGalleys[] = $galley;
				} elseif (in_array($file->getGenreId(), $supplementaryGenreIds)) {
					$supplementaryGalleys[] = $galley;
				}
			}

In this way the primaryGalleys array have all the galleys defined for an article, i.e (primaryGalleys and supplementaryGalleys). This was my solution, maybe the correct solution should be to change in the database my galleys created as supplementary to primary, but I dont investigate more about the subject. I hope this could be of your help.