0.13 Beta 1 Released!

Project Announcements. This is read-only, as in... not for problems/bugs/feature request.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

0.13 Beta 1 Released!

Post by Ted »

As posted to the front page:
It's testing time again, kids!

Well, this is a big release for one major reason. Pretty URL schemes! This is something people have been asking of us for a long time, and it's finally working!

Basically, we can now support nice urls out the box as long as you're on apache or lighttpd. By default, the scheme will be: http://somesite.com/index.php/parent/child.

You can then add mod_rewrite into the mix to get something like: http://somesite.com/parent/child.html

But then it gets interesting. Modules can now define their own url schemes as well. For example, News now has a url structure like this: http://somesite.com/index.php/News/1, where 1 is the id of the news article.

Anyway, we've also added bulk delete of stylesheets and templates, proper support for lighttpd and a lot of bug fixes as well. Check out the changelog and then test to your heart's content. I would love to have 1 beta cycle, but we'll see how well it goes.
And the changelog...
Version 0.13 "Canary" -- Subversion
-----------------

* Added bulk delete/active/inactive of templates
* Added bulk delete of stylesheets
* Added support for lighttpd web server
* Added internal pretty url handling mechanism.  It's
going to be turned off on upgrades, but on with new
installs.  Make sure the {metadata} tag is in your template
if you plan on using it.
* Added hierarchical url handling as well on the interal
mechanism.  You especially want the {metadata} tag with
this option.  It's on in new installs.
* Added base tags to the default admin theme
* Added alt tag and removed extra html from the image tag
* Changed FCKeditor so that it inserts cms_selflink tags by
default when linking to another page in the site
* Fixed bug with {stylesheet name=""} not working properly
* Fixed bug where default template could be set inactive
* Fixed bug where an inactive template set to default would
not be made active automatically
* Fixed bug with deleting multiple pages and not having
hierarchy gettin reset properly
* Fixed bug where installer would sometimes install a
module twice, causing issues later on
* Modified config.php file so that it explains what the
different options are
* Updated adodb lite to 1.20
* Updated smarty to 2.6.13
* Added module API method so modules can output extra CSS for
their admin panels
As usual, please post any bugs here or, better yet, in the forge bug tracker.  Also, as usual, don't put this on a production site without a backup and then complain that it's broken.  It's a beta!  ;)

Thanks so much!  Hopefully this is a quick beta cycle.  I'd like to get this out there...

Ted
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: 0.13 Beta 1 Released!

Post by Dr.CSS »

if they are 'off' on upgrade 'how to' turn them 'on' ?

  mark
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: 0.13 Beta 1 Released!

Post by Ted »

Oh, right.

If you look in config.php (which you'll notice has some documetnation in it now), there are 2 options.

Code: Select all

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;
and

Code: Select all

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;
Change these both to true and clear the cache.  You should be set.
amygdela

Re: 0.13 Beta 1 Released!

Post by amygdela »

congratulations on the next release team! I'll install it on my server, and see how it works out for me... Great job guys! (B)
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am
Location: London, England

Re: 0.13 Beta 1 Released!

Post by stopsatgreen »

Thanks so much for the nicer URLs! Great work!
q20060418

Re: 0.13 Beta 1 Released!

Post by q20060418 »

I've tested version 0.13beta1 and though the new url schema looks like a great improvement, it has a serious disadvantage: it is not indexable with phpDig.

Somehow, this new schema makes phpDig to use 100% of processor and makes it fail most of the time, giving back bad and fakes results while indexing.

If I put config.php parameters back to old schema (($config['internal_pretty_urls']=false and $config['use_hierarchy']=false) things start working again and phpDig work perfect.

Could you please take a look to this problem?
Last edited by q20060418 on Sun Apr 23, 2006 10:54 pm, edited 1 time in total.
THX1138

Re: 0.13 Beta 1 Released!

Post by THX1138 »

Nice work, but the RSS feeds don't work correctly.

Fatal error: Call to a member function on a non-object in /home/folder/lib/classes/class.module.inc.php on line 2328
redkevin11
Forum Members
Forum Members
Posts: 29
Joined: Fri May 20, 2005 6:21 pm

Re: 0.13 Beta 1 Released!

Post by redkevin11 »

My client has wanted this style of urls for a long time.

If anyone is interested in having urls look like: http://yoursite.com/navigation_menus/navtop (w/o index.php in the middle) do the following:

In config.php

Code: Select all


#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu?
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
and move docs/htaccess.txt to /.htaccess and change to the following:

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag session.use_trans_sid Off

# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

I had to add the second RewriteCond to allow site.com/admin to work, and access other folders on the site.
the rewrite rule now doesn't look for .html, so it's as clean as absolutely possible.

I've only done this on apache localhost in os X.
Last edited by redkevin11 on Sun Apr 23, 2006 11:26 pm, edited 1 time in total.
redkevin11
Forum Members
Forum Members
Posts: 29
Joined: Fri May 20, 2005 6:21 pm

Re: 0.13 Beta 1 Released!

Post by redkevin11 »

I was testing my code, and if I copy and paste the .htaccess stuff from the forum, I get an Internal Server Error.  I found that I have to convert all the line endings to Unix (LF) Line Endings and it works. 
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: 0.13 Beta 1 Released!

Post by nils73 »

redkevin11,

great modification, I just adopted it. Works like a charm. Looks even better now and is even better for search-engines. Great work guys!!!

However I would recommend a small change to the general .htaccess-file: instead of index.php it would be better to have /index.php to have a relative path. Otherwise Apache might have problems with Virtual-Servers and mod_rewrite resulting in errors.

Regards,
Nils
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: 0.13 Beta 1 Released!

Post by Russ »

Well Ted I've been playing as promised and there maybe a slight problem with the News module. (I say maybe because I've only just started testing it.)

A URL might look somehting like:

Code: Select all

http://localhost/cms/News/1/79.html
But the RSS looks like:

Code: Select all

<link>http://localhost/cms/News/1.html</link>
e.g. it's missing an element and treating the category id as the page id?


Also perhaps it would be better it the 'News' bit of the url was lower case e.g.

Code: Select all

http://localhost/cms/news/1/79.html
This makes at lot of sense if you use the new friendly url's and have a 'news' page alias for your news page. It doesn't look to difficlut to change this?

and perhaps used the category name so it read something like:

Code: Select all

http://localhost/cms/news/general/79.html

Which would help if you had lots of categories

or date

Code: Select all

http://localhost/cms/news/2006-04-24/79.html

(note reverse date for easier sorting and ISO standards)

Or some conbination of them all? Obviously the the RSS would have to change as well. You did mention this was configurable, do you have any other details?

Would it also be possible to make the ImageGallery configurable in the same way? i.e. in terms of paths shown.

Russ
P.S. everything else seems as per my previous comments re the svn version - bloomin marvelous ;-)
except for internal links...
If you have an internal link on your page (bookmark), like a footer link to jump to you contents div
e.g. href=#contents, it will be appended with the base url (because of the base url from the {metadata} tag and won't work. I'll take any suggestions?

Russ
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: 0.13 Beta 1 Released!

Post by Ted »

@redkevin:  I actually think I might make that the default.  It's much cleaner looking, that's for sure.

@russ: We've already had one person in the irc channel modify it for their own needs with category name and news title (plus the id).  I'll look around at the various blogs out there and see what they use and mimic it.  :)  It's configurable to a point.  It still requires some code change, as I didn't want to go overboard.  I'll look at the image gallery as well...

Oh, and what I ended up doing on the default templates for the anchor is: ^ Top.  Seems to work...
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: 0.13 Beta 1 Released!

Post by Russ »

TED: 1. Thanks Ted for the information, let us know what is happening in IRC - as I can't get to it, maybe just publish the stuff which works :) Or an example we could follow?

TED: 2. Ref: "^ Top"  ...mmmm doesn't seem to work for me. Seems to stay on the first page you visit after clearing the cache? You can see on our test site
http://www.cms.shoesforindustry.net
as I've added

Code: Select all

<p>Smarty Stuff: {$smarty.server.REQUEST_URI}</p>
to the bottom of each page content in the template...
I get 'Smarty Stuff: /index.php' for each page. Note that this site isn't using the latest CMS version, but my local one is and it does the same? Any other ideas?

TED 2: UPDATE 1- Ted your code works if you have 'debug' set to true in your config.php! But does not work if set to false.

TED 2: UPDATE 2 Ted, I've updated the function.cms_selflink.php to give an optional internal page link parameter (dir="anchor" and anchorlink="#internal_link") for the new 0.13 Beta 1
http://forum.cmsmadesimple.org/index.ph ... l#msg23614

TED: 3. The News RSS is wrong isn't it? (As per previous e-mail)

TED: 4: I had a quick look at how to change 'News' to lower case 'news' in new 'news' friendly url's:
(For everyone else -I would not use this on a production site, Ted may well have more places that need to be changed. This works for me with my config - you have been warned you get, assuming a 'news' page alias:)
http://localhost/cms/news.html
http://localhost/cms/news/1/79.html
http://localhost/cms/news/2/79.html

1. In action.default.php
Change line 30: ('News' to 'news')

Code: Select all

echo $this->CreateLink($id, 'rss', $returnid, "<img border=\"0\" src=\"images/cms/xml_rss.gif\" alt=\"RSS Newsfeed\" />", $params,'',false,false,'',true,'News/rss');
To:

Code: Select all

echo $this->CreateLink($id, 'rss', $returnid, "<img border=\"0\" src=\"images/cms/xml_rss.gif\" alt=\"RSS Newsfeed\" />", $params,'',false,false,'',true,'news/rss');
Change line 137, 138 and 139: ('News' to 'news')
Change the bit:

Code: Select all

'News/'.$row['news_id'].'/'
To:

Code: Select all

'news/'.$row['news_id'].'/'

2. In action.rss.php
Change on line 82: ('News' to 'news')

Code: Select all

'News/'.$row['news_id']);
To

Code: Select all

'news/'.$row['news_id']);

3. In News.module.php
Change on lines 65,66,67 and 68: ('News' to 'news')

Code: Select all

(?P<module>News)
To:

Code: Select all

(?P<module>news)

Change line 107 ('News' to 'news')

Code: Select all

	$url = $config['root_url'].'/News/rss/'.rawurlencode($categories);
To:

Code: Select all

	$url = $config['root_url'].'/news/rss/'.rawurlencode($categories);
Change line 109 ('News' to 'news')

Code: Select all

	$url = $config['root_url'].'/index.php/News/rss/'.rawurlencode($categories);
To:

Code: Select all

	$url = $config['root_url'].'/index.php/news/rss/'.rawurlencode($categories);


Change line 744 ('News' to 'news')

Code: Select all

return 'News';
To:

Code: Select all

return 'news';
End of changes

Russ
Last edited by Russ on Tue Apr 25, 2006 3:18 pm, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: 0.13 Beta 1 Released!

Post by Russ »

Ted:
... I'll look at the image gallery as well ...
Sorry, forgot to say a big thank you for this one ;-)

Russ
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: 0.13 Beta 1 Released!

Post by Russ »

Perhaps I've found one more bug with the 'News' module. Summary listing seems fine but when I click on the more link or the news item title (both links show http://localhost/cms/news/2/79.html, which is correct,) the news detail opens up in my home page not the news page, with the correct url of (http://localhost/cms/news/2/79.html).


Any idea what is going on? I've also tried setting detailpage="pagealias"  attribute to another page, but it always seems to use my home page (home.html)???


Russ
Post Reply

Return to “Announcements”