Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not work on OJS 3.1.2 #112

Closed
navotera opened this issue Mar 13, 2019 · 17 comments
Closed

Not work on OJS 3.1.2 #112

navotera opened this issue Mar 13, 2019 · 17 comments

Comments

@navotera
Copy link

No description provided.

@asmecher
Copy link
Member

@navotera, can you describe what doesn't work? Is there an error message or similar? This doesn't give enough information to work with.

@navotera
Copy link
Author

navotera commented Mar 14, 2019

hi @asmecher
OJS 3.1.2 does not load any of template file from this theme.

For example when the page load on the home index, it should load the template file from this theme
->bootstrap 3
-> templates
->frontend
->all custom template file such as indexSite.tpl, header.tpl or other partials template files within this theme.

But it does not load any of those custom smarty file (*.tpl), the page being accessed only load the default layout from the lib->pkp->templates.

And I could say that this is work on the previous version (OJS 3.1.1).

I curious and install another theme specifically healthscience theme and you know what it does not work too.

Is there some configuration that need to activate to use the custom template file for custom theme for the ojs 3.1.2 since it works flawlessly on the previous version ?
Thank

@NateWr
Copy link
Contributor

NateWr commented Mar 14, 2019

Hi @navotera,

That sounds like you have a more general problem with the installation of your themes. Did you install the Health Science theme from the Plugin Gallery under Settings > Website > Plugins? If you install directly from GitHub, make sure you are using the compatible release package, and not just downloading the automatic zip of the master branch.

@navotera
Copy link
Author

navotera commented Mar 14, 2019

Here what step I took based on your Readme File :

  1. Download the latest release.
    image

  2. Unpack the .zip file and move the bootstrap3 directory to your OJS installation at /plugins/themes/bootstrap3.
    image

  3. Login to the admin area of your OJS website. Browse to the Settings > Website > Plugins page and enable the Bootstrap 3 theme.
    image

  4. Browse to the Settings > Website > Appearance page and select Bootstrap 3 from the theme option and save your change.
    image

And Save

  1. Result :
    image

and not work

@mpbraendle
Copy link

Tried the plugin, too. The following error is generated:
[15-Mar-2019 11:55:29 UTC] PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "app:app:frontendpagesindexJournal" on line 50 "{php}break;{/php}" {php}{/php} tags not allowed. Use SmartyBC to enable them <--
thrown in /usr/local/service/www/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 50

@mpbraendle
Copy link

Which is in templates/frontend/pages/indexJournal.tpl
I'm trying to comment those lines and will report back.

@mpbraendle
Copy link

Also:
PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "app:app:frontendcomponentsnavigat" on line 20 "{php}continue;{/php}" {php}{/php} tags not allowed. Use SmartyBC to enable them <--
thrown in /usr/local/service/www/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 20

Which is in templates/frontend/components/navigationMenu.tpl

PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "app:app:frontendobjectsarticlesum" on line 70 "{php}continue;{/php}" {php}{/php} tags not allowed. Use SmartyBC to enable them <--
thrown in /usr/local/service/www/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 70

in templates/frontend/objects/article_summary.tpl

@mpbraendle
Copy link

mpbraendle commented Mar 15, 2019

If one comments the offending lines (with {* *} ) the home page of the journals is shown in the chosen Bootstrap theme.

Looks like there are some old tags used in the templates which require the Smarty Backwards Compatibility turned on.
Either the templates must be fixed to be Smarty3-compliant (replace all {php} and {include_php} tags) or the SmartyBC must be included.

@navotera
Copy link
Author

navotera commented Mar 15, 2019

hi mr @mpbraendle

I never found such error on my apache error log.

are you sure you used the latest version of this theme ?

your error already fixed by the author of the theme as I see in the indexJournal.tpl files :
Here the preview :
image

@mpbraendle
Copy link

mpbraendle commented Mar 15, 2019

You are correct. My plugin was still on 3.1.1 (probably copied it over).
Did an upgrade and it works as expected. Sorry for messing up this thread.

@mpbraendle
Copy link

It is still not clear what happened in your case.
Did you try to upgrade the plugin using the Plugin Gallery? You should try to do so (enable write permission on plugins, themes, and bootstrap3 directory temporarily)

@navotera
Copy link
Author

navotera commented Mar 15, 2019 via email

@mpbraendle
Copy link

In my case, I copied over the plugin from a 3.1.1.4 installation, then did the upgrade via plugin gallery. Works perfectly.
I recommend you to use the plugin gallery, too. Sometimes getting plugins from Github may not install all dependencies (although that will probably not be the cause for this plugin).

@navotera
Copy link
Author

navotera commented Mar 15, 2019 via email

@navotera
Copy link
Author

this is bug on OJS 3.1.2.

And already fixed by vitaly
pkp/pkp-lib#4600

@NateWr
Copy link
Contributor

NateWr commented Mar 18, 2019

@navotera glad you were able to get it working. A quick note about this step you shared:

When downloading a release, always use the bootstrap3-<version>.tar.gz file. This is the package that is intended for distribution. The "source code" files are added automatically by github and i don't know how to remove them, but they will usually lead to an error in the name of the plugin folder.

@navotera
Copy link
Author

Thank for your guide @NateWr

Hope it would have benefit for others user too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants