I'm calling url_for() inside these javascript tags:
<script type="text/javascript">
$.post('<?php echo url_for('category_set_representative_image',
array('sf_subject' => $category)) ?>',
function(){
alert("fadsf");
}
);
</script>
but I'm getting this error:
sfError404Exception: Empty module and/or action after parsing the URL
'/rappresentativa' (/).
I have also this routing rule:
category_set_representative_image:
url: /rappresentativa
param: { module: category_new, action: setRepresentativeImage }
class: sfDoctrineRoute
options: { model: Category, type: object }
NOTE: I don't have problems if I call the same url_for() far from the tags.
Any idea?
sf 1.4
Javi