We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Css webtools 3.1.2 is not loaded

I have just enabled the webtools in a new project of version 3.1.2 but does not load the CSS, the design was not loaded, only the simple page appears. My operating system is windows 10: The address of my path is

C: \ phalcon-devtools \ phalcon-devtools-master

And it is correctly added because if I let it enable it normally



85.5k
edited Apr '17

create a vhost and open it this way, now like c:\www.....\index.html



3.4k

I'm unfamiliar with developing on win10, but depending on your web server (nginx, apache), you can create a virtual host. It's most likely not loading the styles because of a path issue.

Remember, once you've done that, you need to change your C:\Windows\System32\drivers\etc\hosts file



13.8k
Accepted
answer
edited Apr '17

I had the same. You need to add a static URI

in config.php i put it under application


return new \Phalcon\Config([
    'database' => [
        'adapter'     => 'Mysql',
        'host'        => 'localhost',
        'username'    => 'root',
        'password'    => '',
        'dbname'      => 'phalcon-time',
        //'charset'     => 'utf8_general_ci',
    ],
    'application' => [
        'appDir'            => APP_PATH . '/',
        'controllersDir'    => APP_PATH . '/controllers/',
        'modelsDir'         => APP_PATH . '/models/',
        'viewsDir'          => APP_PATH . '/views/',
        'pluginsDir'        => APP_PATH . '/plugins/',
        'formsDir'          => APP_PATH . '/forms/',
        'formsElementsDir'  => APP_PATH . '/forms/elements/',
        'vendorDir'         => APP_PATH . '/vendor/',
        'cacheDir'          => BASE_PATH . '/cache/',
        'baseUri'           => '/phalcon-time/', 
        'staticUri'         => '/phalcon-time/' // <------------------------------------------- here
    ],
    'settings' => [
        'development'    => TRUE,
    ]
]);

If that doesnt work add also the base URI

$di->setShared('url', function () {
    $config = $this->getConfig();

    $url = new UrlResolver();
    $url->setBaseUri($config->application->baseUri);

    return $url;
});

The credits go to this answer though. Thats what i found to solve it: https://forum.phalcon.io/discussion/15111/webtools-can-not-load-css-if-using-different-baseuri

Hello. This problem was solved. Could you update your dev-tools and try again?



16.3k
edited Nov '17

This has not been solved yet @Sergei. I downloaded the DevTools, installed Webtools on a Windows Wamp installation. It doesn't work by default. Without the change mentioned by @Videles only the raw page shows up.

@Amal could you create new issue whith steps to reproduce, please and I'll try to sort out?



16.3k

@Sergeysviridenko I think this is already reported earlier in many ways - See #1132. I think its the same issue as reported by posts where staticURI solution has been suggested to show webtools page properly. If you still want me to log it, kindly confirm. I will do it.

@Amal OK. I'll try to reproduce this with staticURL asap.