Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:20:38+00:00 2026-06-14T20:20:38+00:00

I have to generate an URL in a task but I get an incorrect

  • 0

I have to generate an URL in a task but I get an incorrect url of type:

./symfony/user/edit/id

when I need

/user/edit/id

My first try was:

protected function execute($arguments = array(), $options = array())
{
    $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', $options['env'], true);
    $this->context = sfContext::createInstance($configuration);
    $baseurl = $this->context->getController()->genUrl(array('module' => 'user','action' => 'edit', 'id' => $id));
    // ...
}

My second try, following this answer gives the same incorrect url:

protected function execute($arguments = array(), $options = array())
{

    $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', $options['env'], true);
    $this->context = sfContext::createInstance($configuration);
    $routing = $this->context->getRouting();
    $baseurl = $routing->generate('user_edit', array('id' => $id));
    // ...
}

How can I get the correct URL ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:20:39+00:00Added an answer on June 14, 2026 at 8:20 pm

    I solved adding the –application option!

    protected function configure()
    {
        $this->addOptions(array(
            new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),
            new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'frontend'),
        ));
    
        //...
    }
    

    I didn’t know that it was required even if I write directly its name in the getApplicationConfiguration params.

    $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', $options['env'], true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my view the call below generates url ending with Tasks/Edit but I want
I have and URL which is homepage/profile.php?id=15&username=dinesh.kumar now i would like to generate URL
I have a cms that does not generate friendly url's What is the best
I have some trouble using the Zend url helper with get parameter. In a
i want to know how to generate a url in a servlet. I have
I have an Zend Application that generate URL like that http://miapp.com/module/controller/action/params/values I want to
I am having trouble doing a reverse URL lookup for Django-generated feeds. I have
I have to generate an executable (.exe) file from my python program. I would
I have to generate XML in the below format <objects> <items> <item =delete> <searchfields>
for a C++ Web-Server I have to generate session id's. I thought of using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.