Can´t upload custom CSS in OJS 3.0

ojs3
Tags: #<Tag:0x007f7696ffa870>

#23

OJS 3.0.2 PHP 5.5 trying to upload the theme.css file described in the mpg OJS 3 custom responsive theme.

run into the same problem, cannot upload this file. Have commented out the following line in the site config file.
;mime_database_path = /etc/magic.mime
and cannot upload the css file that I’ve named theme.css.
I’ve checked that the file has no comments at the top, and have checked there are no tabs in the file.

Any ideas welcome


#24

Hi Alec
We have the same problem here (local and on server). In which folder custom css are loaded? I’ll put the file there manually. Thanks.
Best
Jan


#25

Hi @trace,

CSS files are stored within specific subdirectories in the public directory, but just putting the file there will not be enough – the database will need to point to it. I’d suggest figuring out why your CSS documents aren’t being detected properly.

Regards,
Alec Smecher
Public Knowledge Project Team


#27

To “uncomment” ;mime_database_path = /etc/magic.mime in the config file resolved the problem. (Deletion of the semicolon).


#29

@asmecher and everyone else. My journal has been peaceful but not anymore after upgrading to OJS 3.1.0 build 1. Images cannot upload…

My mimetype settings is:

;mime_database_path = /etc/mime.types
mime_database_path = /etc/magic.mime

The one that is commented was working b4 upgrade… now none of them works


#30

Hi @otuya1,

This thread is about CSS and your question is about images; can you post as a new topic? Include the version you upgraded from. Check the usual suspects like file permissions; there are FAQ questions about these.

Regards,
Alec Smecher
Public Knowledge Project Team


#31

Hi friends

While remanaging our site, went over this issue and found that the css file must contain pure css code. Without any comment.

Best regards

Mouseonthemoon


#32

I have the same problem if you find the solution, please share it with me.


#33

hi @Pandora_ramin CSS or Images? mine was Images and had it fixed by defining path to mimetypes in Config file. It is my hosting provider who provided me with the correct path to mimetypes


(Ojs 3.0.1) Upload Image Problem
How do I manually upload the logo image and the .css file? Please help
#34

It does not let me upload any images or .css files in both shows me this message.


#35

Please, if you find the solution, share it with me.


#36

hi … i dont understand that language. Can you set your language to English please?, maybe i can help


#37

I try to upload an image for the logo and the message appears:
“The file could not be uploaded, please try again or contact the administrator if the problem persists”

The same message appears when I want to upload a .css file.
I have installed the OJS 3…1.1.
I have reviewed the folders’ persmises and it is not solved, I have also checked that the path of mimetypes is in comments and nothing solves the problem.


#38

Some people have faced this problem due to various reasons:

  1. permissions
  2. Disk spaces
  3. having not installed native php and set the right path to mime types.

Check and see if you are affected by any of those.


#39

Thank you very much for your help and sorry my english.In reference to the possible solutions:
1.- permissions This is fine 777
2.-Disk spaces I have unlimited space
3.- having not installed native php My PHP is 5.6.36
4.- and set the right path to mime types. This path as I get it because I have searched my server and can not find any file that is .mime And this is the last solution I have to try. I desesperated.


#40

for right path, you need to ask your hosting service provider.

for my case… my hosting had to install the following for me.

image
and my journal now works well Stratford Journals


#41

Hi all,

@Pandora_ramin, note that 777 permissions are never safe to use in production – though they can be useful for testing.

What does your mime_database_path setting in config.inc.php currently look like?

Are you able to upload images to the various image fields e.g. for logos and covers?

Regards,
Alec Smecher
Public Knowledge Project Team


#42

What does your mime_database_path setting in config.inc.php currently look like?

If I already reviewed this, what I do not know is which is the path where the .mime file is located on my server. I searched for it and could not find the magic.mime file.

Are you able to upload images to the various image fields e.g. for logos and covers?

When I try to upload an image for the logo I get the message that I have indicated, the same message appears when I want to upload the .css file. If I tried to upload images of different sizes.
What has allowed me to upload an image on the footer.


#43

I need urgent help, I have contacted my hosting provider to tell me the route of the mime types and he has indicated it to me. But the problem was not solved.
Then they told me:

The problem it presents is with the database when recognizing the function that makes the entry of information record, this occurs because it appears to be entering data invalid or null as indicated by the error log.

[18-May-2018 22:46:11 UTC] PHP Strict Standards: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/nydsigel/public_html/disertante.com/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0
[18-May-2018 22:46:11 UTC] PHP Strict Standards: Declaration of LensGalleyPlugin::register() should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/nydsigel/public_html/disertante.com/plugins/generic/lensGalley/LensGalleyPlugin.inc.php on line 0

This is due to the fact that currently in the last update the strict mode is activated in the servers, to avoid injection in web pages and Online systems, as precautionary measures against possible attacks. You should check how the information is entered into the database and verify that the information does not contain invalid, null or void data, as this is generating errors.

They told me:
That I must identify the file that makes the entry of the information to the database and add some kind of validation of the information so that it does not have null data. Additional within the database that your OJS system uses verify that you do not have this type of data.

Also Reviewing the folders I noticed that the images I want to upload if they are uploaded but saved in a temporary folder and there they stay.

WHAT DO I HAVE TO DO. HELP ME


#44

Hi @Pandora_ramin,

I’ve followed up on your other thread. Again, please don’t post the same thing in multiple places.

Regards,
Alec Smecher
Public Knowledge Project Team