OJS 3: Metadata appears again after saving

I have tried searching this topic but nothing found. I edited metadata of articles then save it. After hitting save, metadata box appears again. I tried saving again but it appears again. I just closed it. Some edited items are saved such as adding new contributor but some are not such as set abstract in justify alignment. Could you tell me what is the problem and how to solve it?

Thanks

Hi @kawahyu,

I suspect the metadata box is behaving as expected – the problem may be that you’re using markup to set the alignment that the HTML filter doesn’t permit. Can you check what markup TinyMCE is using for justified alignment?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I just know the generic plugin → TinyMCE plugin is enabled. I attached the screenshots the way I make justify alignment

Hi @kawahyu,

Can you check what markup TinyMCE is using for justified alignment? Use the <> button to look at the HTML code it’s generating.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @kawahyu,

The HTML filter doesn’t allow that HTML element and attribute. You can adjust what HTML you allow by editing config.inc.php and looking for the allowed_html setting.

Regards,
Alec Smecher
Public Knowledge Project Team

Does the change affect update process to the higher update, e.g. 3.0.1?

Hi @kawahyu,

You can change config.inc.php settings without causing upgrade problems or considerations.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello Alec,

I have a same question about this;

I check the config.inc.php aetting and I saw this

; Allowed HTML tags for fields that permit restricted HTML.
; Use e.g. “img[src,alt],p” to allow “src” and “alt” attributes to the “img”
; tag, and also to permit the “p” paragraph tag. Unspecified attributes will be
; stripped.
allowed_html = “a[href|target|title],em,strong,cite,code,ul,ol,li[class],dl,dt,dd,b,i,u,img[src|alt],sup,sub,br,p,<>”

and add this <>;

I don’t if is correct;

Hi @Darryl_Nuyda,

That’s not the right syntax for that setting. What HTML tags/attributes are you trying to permit?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello Alec,

I am exploring about Justify the abstract content and apply some words italics in Title area.

Hi @Darryl_Nuyda,

You would need to add div[style] to the list to permit justification in the abstracts. (Note that you’ll be allowing anyone to enter arbitrary styles this way!) We don’t yet have a recommendation on how to handle rich markup in title elements – see this thread for discussion.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher

I apply this style yeah good in text-area the content is justify but when you viewing the article content no change applied and still unjustified.

Justify

Hi @Darryl_Nuyda,

What is your current allowed_html setting value, what HTML markup are you putting into that field, and what HTML markup is being displayed on the front end? (Use the “preformatted text” tool to quote e.g. HTML markup when posting in this forum.)

Regards,
Alec Smecher
Public Knowledge Project Team

Was there ever a solution to this thread or guys gave up? The conversation seemed like nobody had knowledge of what really was the problem. I just have the same problem…

Hi @otuya1,

See e.g. Justify alignment for abstract.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, That link seems not helping me much. Okay for justifying abstract text i simply added style=“text-align:justify;” in article_details.tpl on div class=“abstract” and that sorted it out.
My problem now is this.
This is how my abstract looks like when uploading: htere are bolds, and paragraphs
image
and this how ojs302 renders abstract: no paragraphs
image
and finally this is how my config file looks like:

allowed_html = "<a href|target> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br /><hr /><b> <i> <u> <img src|alt> <sup> <sub> <br> <p></p></sub></sup></u></i></b></dd></dt></dl></li></ol></ul></code></cite></strong></em></a>"

kindly help

Hi @otuya1,

That’s the wrong syntax for the allowed_html setting. Have a look at config.TEMPLATE.inc.php for an example.

Regards,
Alec Smecher
Public Knowlege Project Team

Thanks, it is good now.