[OJS 3.1.1][oldGregg] Download tab in article detail page is blank

Hi @Vitaliy,
Sorry to bother you again. I am posting here in forum because I feel the problem is only in my installation.

The download tab in article detail page shows blank. This behavior is in both abstract only articles and in articles with JATS xml. I don’t remember messing with the files. All other tabs works fine.

image

image

image

 <a class="nav-item nav-link" id="nav-download-tab" data-toggle="tab" href="#nav-download" role="tab"
               aria-controls="nav-download" aria-selected="false">
                <i class="fas fa-download fa-lg"></i>
                <span class="tab-title">
                    {translate key="plugins.gregg.download"}
                </span>
            </a>
<div class="tab-pane fade" id="nav-download" role="tabpanel" aria-labelledby="nav-download-tab">
                {if $primaryGalleys}
                    <div class="galleys">
                        <ul class="galley-links">
                            {foreach from=$primaryGalleys item=galley}
                                <li class="galley-links-items">
                                    {include file="frontend/objects/galley_link.tpl" parent=$article galley=$galley purchaseFee=$currentJournal->getSetting('purchaseArticleFee') purchaseCurrency=$currentJournal->getSetting('currency')}
                                </li>
                            {/foreach}
                        </ul>
                    </div>
                {/if}
            </div>

Error_log:

PHP Warning:  Smarty error: [in frontend/parser/text.tpl line 24]: syntax error: assign: missing 'value' parameter in /home/jlmcedun/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094
PHP Warning:  Smarty error: [in frontend/parser/text.tpl line 30]: syntax error: assign: missing 'value' parameter in /home/jlmcedun/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094
PHP Warning:  Smarty error: [in frontend/parser/text.tpl line 31]: syntax error: assign: missing 'value' parameter in /home/jlmcedun/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094

Any idea, where is the fault?

Best regards,

@anupent,

This means an error in Smarty template that prevents the downloading of a page’s part. Check the text.tpl file, are pointed in the error log lines identical to those in the master branch:
https://github.com/Vitaliy-1/oldGregg/blob/master/templates/frontend/parser/text.tpl#L24

Hi @Vitaliy,
Yes I did not have value=''
in all the three lines. I updated them, still not luck.

Then I downloaded a new package from your gitHub master and installed it and switched the theme to oldGregg. Still, I do not get those download items.

image

Does your demo site consists of OJS 3.1.1 with latest version of oldGregg theme?

Best regards,

1 Like

I have latest version of Old Gregg theme on my local machine and all works fine. Make sure that cache is cleared.
After update, do you see the same error?

1 Like

There are no errors anymore. But, still the download buttons are not visible. Later today I am planning to start reinstalling from scratch.

I recreated a test journal from scratch and everything seems to work fine.
So, the problem should be in my installation.

2 Likes

Hmm, interesting from where that error had come. Glad you’ve made it work!

1 Like

Hi @Vitaliy, @asmecher, @bozana,

As I import my production database into this new trial installation, the download buttons disappears even in the default theme.

image

I had removed a few article components and added other few according to my needs. Could this be the cause of disappearance of download buttons?

image

I added those removed components but still no luck?
Please help me restore those missing download buttons.

Best regards,

1 Like

Hmm,

Can you check genres table in your database? If all is normal, you should see there entry_keys with correspondent genre_id.
Then, in the submission_files table you should see your galleys. I suppose, file_stage 10 means production (although I don’t know exactly) and genre_id - the id from genres table.
If something is wrong on the database level, most probably you will notice something strange there.

1 Like

I compared genres table with my working previous one and found the difference (I did not know what all were the differences). So, I backed up the table and dropped it and imported the table from working back up.

Eureka, it started function well.

Thanks @Vitaliy for your hint.

Best regards,

1 Like

Hello, @anupent I have the same problem, but in my case, if I go back to the default theme my Download pdf file is fine and I can see it.

I can not find the submission_files table

Hi @josuevalrob,
In my case, the buttons were absent even with the default theme and there was problem with a table (I do not remember now which).

Seems you have a different problem. Should be related to the theme you are using. Can you reinstall the theme and check if it works/

Best regards,

1 Like

Yeah, the problem is with the theme.

This is the github issue

Can you checkit??

now is working, but just for the issue with a XML view. Without an XML it doesnt show anything.

Can you replace your following files from a recent download from GitHub and see if it works

plugins\themes\oldGregg\templates\frontend\objects\articleOnlyAbstract.tpl

plugins\themes\oldGregg\templates\frontend\parser\articleMainText.tpl

Best regards,

1 Like

I’ve answered you in your other thread. Unfortunately this issue is not related to Old Gregg theme, but to problems with OJS database during the upgrade: Suplementary Gallery Vs. Primary Gallery - #2 by Vitaliy

1 Like