OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems with css files and internal links [RESOLVED]

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Problems with css files and internal links [RESOLVED]

Postby neophyte13 » Tue Feb 12, 2008 8:01 pm

For the past few weeks I have been experimenting with OJS and have found it to be quite user friendly. However, saying that, there are a few problems I have encountered which the IT "experts" in our institution are unable to answer for me. So without further adieu, here they are.

1. Not liking the formatting and design associated with the right side bars, I made changes on the roundedcorners.css file and then uploaded the new version using Step 5 as Journal Manager. However, the changes I wanted to occur never came to fruition. Moreover, when I "saved" the webpage using my browser and took a look at the roundedcorners.css file that was downloaded, I saw that it was the original and not the one I changed.

Also, when I clicked on the link in Step 5 which had the name of the uploaded css file, I notice that it has been renamed journalStyleSheet. Lo and behold, when I took a look at the folder that was downloaded when I saved the page through my web browser, I saw the newly named file. My question is, where is this file - now called "journalStyleSheet" located. Furthermore, why did it not supercede the instructions being initiated by the original roundedcorners.css. file? Am I doing something wrong?

2. I have found that within the online journal I have set up, many of the internal links are not operating properly. For example, clicking on the "For Readers," in the right hand menu, one is taken to a page where there are two links within the contents of the text. No matter how I try to change the links, the program changes them to relative URLs. Unfortunately, these relative URLs drop part of the actual URL - namely the journal path name "cpi" which comes after index.php. I have tried to change this through OJS from the Journal Manager - Journal Set Up - The Look - Section 5.7 Information, using the break link and insert link method. I have also tried to work directly with the HTML coding itself and even tried cutting and pasting the text using the Word function. Regardless what I do, the program changes the links to relative ones. ie.
href="../about/submissions#privacyStatement" rather than what I typed in which was
http://webapps2.universityxyz.ca/~willi ... yStatement. Moreover, when a person hovers over the privacy link in the Reader section, the "abc" after the index.php is missing.

If anyone can shed some light on these two issues, it would be greatly appreciated. Thanks in advance.
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Problems with css files and internal links

Postby jmacgreg » Tue Feb 12, 2008 8:43 pm

Hi neophyte13,

Regarding question 1: I've just written a new document that details various ways in customizing OJS. It hasn't been officially released yet, but feel free to take a look:

http://pkp.sfu.ca/files/docs/customizingojs/index.html

In it you'll find a section dealing with css modifications that you'll find useful. you may also want to check out the following link:

viewtopic.php?f=8&t=2615

Let me know if you run into any other issues with respect to stylesheets.

2. This seems to be a strange problem -- which version of OJS are you running?

Thanks,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with css files and internal links

Postby jmacgreg » Tue Feb 12, 2008 8:54 pm

Hi neophyte13,

Actually, regarding question #2, please check the following bug and patch:

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3186

Let me know if that works.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with css files and internal links

Postby neophyte13 » Wed Feb 13, 2008 10:01 am

Hi James-

Thanks for your reply. I have forwarded the information to the IT guys in hopes that they will find the patch helpful. As for the version of OJS we are using, it is 2.2. James, the only way I could get the rounded corner plug in to represent the changes that I wanted was to download the standard roundedcorners.css file, make the changes I wanted on that document and upload the file to its original locale using the same file name. This I did not through OJS but through the Secure File Transfer side of SSH.

As to where the OJS renamed file (journalStyleSheet.css) has been placed, I have no idea. I have looked in the public/journals/1/ folder and it is empty. However, when I view the source of a page in the journal, it appears to be calling for the journalStyleSheet.css from that locale. In addition, when I put the URL as found in the html text of the page in my browser, up pops the corrected version of the roundedcornders.css - the one I uploaded through OJS and it renamed journalStyleSheet.css. One would have thought that by deleting the style sheet in Step 5, it would no longer be present or found in the page's html coding. Am I wrong in this assumption?

Thanks again, James for your help. I will let you know if the bugs get worked out.

Have a good day.

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Problems with css files and internal links

Postby jmacgreg » Wed Feb 13, 2008 2:04 pm

Hi neophyte13,

James, the only way I could get the rounded corner plug in to represent the changes that I wanted was to download the standard roundedcorners.css file, make the changes I wanted on that document and upload the file to its original locale using the same file name. This I did not through OJS but through the Secure File Transfer side of SSH.


That's probably the only way to do it, as roundedcorners.css is called *after* journalStyleSheet.css. If you stick to making sidebar-specific changes to that one file, and are careful when you upgrade, you should be fine. This is the method the plugin maintainers recommend, I believe.

As to where the OJS renamed file (journalStyleSheet.css) has been placed, I have no idea. I have looked in the public/journals/1/ folder and it is empty. However, when I view the source of a page in the journal, it appears to be calling for the journalStyleSheet.css from that locale. In addition, when I put the URL as found in the html text of the page in my browser, up pops the corrected version of the roundedcornders.css - the one I uploaded through OJS and it renamed journalStyleSheet.css. One would have thought that by deleting the style sheet in Step 5, it would no longer be present or found in the page's html coding. Am I wrong in this assumption?


I'll give a rundown of what happens when you upload a css file: OJS takes the file, renames it to journalStyleSheet.css, and puts it in public/journals/[x]/, where x is the journal number. When you delete the file through OJS itself (ie., by pressing the Delete button on Step 5), OJS will delete the file from the server. In addition, there should be no link to the css file in your header any more.

You may want to try clearing the template caches from the Site Admin user home page. It sounds like the file is being deleted properly from the server, but that perhaps the cache isn't updating itself properly. Could you check that and get back to me? And if I've misunderstood what's going on, please let me know.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with css files and internal links

Postby neophyte13 » Wed Feb 13, 2008 2:55 pm

Hi James-

I am happy to report that the patch you directed me to did the trick. All of the internal links are now working properly. Thanks.

As for the roundedcorner issue, I did some more checking and found that for the change to be effective it was the roundedcorner.css in the OJS2-2 folder and not the one in the individual journal folder that seemed to be responsible for the change. In other words, if I changed only roundedcorner.css file contained within the journal folder, nothing happened. Unfortunately, what this means is that any future journals that will be developed from this OJS "hub" will have no option but to assume the same roundedcorner.css adaptation I have done for this first journal. This, of course, assumes that the roundedcorner plug-in will be enabled in any upcoming journals.

Once again, thanks for your help James. I really appreciate it.

Have a great day.

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Problems with css files and internal links

Postby jmacgreg » Wed Feb 13, 2008 3:12 pm

Hi neophyte13,

I'm glad to hear that your problems have been more or less solved. The css issue is indeed a tricky one, and I can see where, if there were multiple journals, the css inheritance as it currently stands may not be ideal. I'll pass your comments on to the plugin developers, and it may be addressed in future versions.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 3 guests