CHtml::link broken using urlManager for blog module

I have converted the Yii blog demo into a module.








All of the above rules work, if I type them into the web browser manually.

However, the links generated by:

<?php echo CHtml::link(CHtml::encode($data->title), $data->url); ?>

is not in path format!

eg. /post/4?title=test2

However other things ARE in path format:


I’m really confused to what the problem may be.

I found a solution. It looks like there might be a bug in CreateURL.

I had to manually insert the module id into the createUrl function in the post controller. However, it is suppose to do this automatically.

“Since version 1.0.3, if the controller belongs to a module, the module ID will be prefixed to the route. (If you do not want the module ID prefix, the route should start with a slash ‘/’.)”

This is my temporary fix, inserting the module ID and a /.

	public function getUrl()


		return Yii::app()->createUrl(Yii::app()->controller->module->id.'/'.'post/view', array(