Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326623

Summary: ProjectInfoData should strip the hostname portion of the URI and open the file locally for paragraphurl and other local URLs
Product: Community Reporter: Jeff McAffer <jeffmcaffer>
Component: WebsiteAssignee: Christopher Guindon <chris.guindon>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P3 CC: chris.guindon, wayne.beaton
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
See Also: https://git.eclipse.org/r/129076
https://git.eclipse.org/c/www.eclipse.org/projects.git/commit/?id=058067b83bb4f6b56220662649b6fcd8f5c05bdb
https://git.eclipse.org/c/www.eclipse.org/eclipse.org-common.git/commit/?id=b1745c0e7ed83df460b6567294e079b9a0830362
Whiteboard:

Description Jeff McAffer CLA 2010-09-29 23:33:27 EDT
in updating some project websites I was using the ProjectInfoData facilities to get records from the project database. One of the things fetched was the paragraphurl. This value was used as an argument to file_get_contents(). The value in the database was http://eclipse.org/equinox/paragraph.html.  This resulted in a 404.  Changing the database entry to be http://www.eclipse.org/equinox/paragraph.html eliminated the problem.

Interestingly, accessing the first url (without www) works fine from a browser.  AFAIK there has not been a stated requirement to use www in the urls in the project database.

Sidenote: www is passe
Comment 1 Denis Roy CLA 2010-09-30 10:30:35 EDT
Webmasters are the definition of cool -- we were not intentionally forcing people to live in the '90s.  The web server simply wasn't set up to refer to itself (because that makes no sense, really) but I've configured it now.

Actually, go ahead and use http://localhost/equinox/paragraph.html and impress everyone when it works on the site, but not on a browser.

In all seriousness, using 'localhost' will save a DNS lookup on our web servers, and won't go though the whole process of estalishing/tearing down a TCP socket.

Then again, ProjectInfoData should simply strip the hostname portion of the URI and open the file locally so that we avoid calling the webserver.  I'll rename this bug so that we do that instead.


Sidenote: passe is spelled passé  :-)
Comment 2 Jeff McAffer CLA 2010-09-30 10:45:08 EDT
(In reply to comment #1)
> Webmasters are the definition of cool

Of course! I could only assume that while you were out to (at) lunch, Wayne came in an put www everywhere...

> Actually, go ahead and use http://localhost/equinox/paragraph.html and impress
> everyone when it works on the site, but not on a browser.
> 
> In all seriousness, using 'localhost' will save a DNS lookup on our web
> servers, and won't go though the whole process of estalishing/tearing down a
> TCP socket.

Sure but we dont really want people putting in localhost.  the values in the database will be used in other contexts (e.g., perhaps just embedded in a web page) and that would now work.

> Then again, ProjectInfoData should simply strip the hostname portion of the URI
> and open the file locally so that we avoid calling the webserver.  I'll rename
> this bug so that we do that instead.

Yes, normalizing this would be great.  In my case I'm taking the value (the url) and using it to all file_get_contents so I the content can be embedded in my webpage.  At first I was putting http://www.eclipse.org on the front because ECF put their URL in with no http://....  Then there were other projects that put full URLs in the data field.  What's a guy to do?!  Having this normalized (don't care which way) would be great.

Note also that the portal was actually having this problem in that for some of my project fields (e.g., descriptionurl) I put in http://eclipse.org/rt/description.html.  That did not work but there were no errors reported.  I changed it to have www and it worked.  It seems loikely that other projects did not put in the http:// part.

Can you state definitively which way it is supposed to be?

> Sidenote: passe is spelled passé  :-)

Indeed.  Now I can cut and paste the é.  Thanks!
Comment 3 Denis Roy CLA 2010-09-30 11:00:51 EDT
We always drag Wayne to lunch with us because we don't trust him.
Comment 4 Eclipse Genie CLA 2018-09-10 21:07:53 EDT
New Gerrit change created: https://git.eclipse.org/r/129076
Comment 5 Wayne Beaton CLA 2018-09-10 22:19:07 EDT
(In reply to Denis Roy from comment #3)
> We always drag Wayne to lunch with us because we don't trust him.

Good thinking.

I've removed all of the references that I have to the projectInfoData.php (I found a few old references in /projects).

The information that that class provides is based on data that's accessible only via the portal. We've already removed the edit functionality. I recommend that we just delete the class. 

I'm pretty sure that we can remove projectInfoList.php as well.

Note that there are some references in eclipse.org-common that need to be purged. I can help.
Comment 7 Frederic Gurr CLA 2021-12-22 10:49:58 EST
This issue has been migrated to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/136.