Open maxodrom opened 8 years ago
Hi Maxodrom,
can you try it with:
$tour = new Tour([
when you import the class with use MyCademy\BootstrapTour\Tour;
you should only use the class name itself, otherwise php will try to look for the class relative to the namespace of your own class.
Yes, I tried. Same problem...
use yii\web\View;
use yii\bootstrap\Html;
use MyCademy\BootstrapTour\Tour;
$tour = new Tour([
'scope' => 'window', //Set scope to make the 'tour' variable global
'startMode' => Tour::START_MODE_INIT_ONLY, //Only initialize the tour
'clientOptions' => [ //Bootstrap Tour Options, see: http://bootstraptour.com/api/
'steps' => [
[
'element' => "#tour-el1",
'title' => "step 1",
'content' => "test 1",
],
[
'element' => "#tour-el2",
'title' => "step 2",
'content' => "test2",
],
],
],
]);
$tour->run();
The problem remains.
Are you sure your 'vendor' map on the linux server is up-to-date?
Yes, I installed the packages today: Updating dependencies (including require-dev)
But only locally on your windows pc?
Packages are correctly installed on my local project copy and on hosting (remotly). But on my Windows local project copy all is working correctly, but on linux-hosting the problem is occurred.
Construction:
use MyCademy\BootstrapTour\Tour;
$tour = new Tour([...
correctly works on Windows, but not in Linux. Maybe the problem is just that?
We're using the same code on both windows and linux, so I don't think that can be the problem. I'll have to investigate further.
Yes, the code base is the same on windows and linux.
Consider that:
In my view I have the follow:
use yii\web\View;
use yii\bootstrap\Html;
use rmrevin\yii\fontawesome\FA;
use MyCademy\BootstrapTour\Tour;
For example construction:
use rmrevin\yii\fontawesome\FA;
echo FA::icon(FA::_REFRESH);
works correctly, but yours (on linux) is not. Only on Windows.
And did you check your code on Linux env? In my code I am using your approach accorging your manual.
Yes, runs without any difference CentOS 7
Hmm... ok. I will check this and create ticket in hosting support. Thanks.
In composer.json (require section):
In view am using:
And i am got error: PHP Fatal Error – yii\base\ErrorException Class 'MyCademy\BootstrapTour\Tour' not found
On my Windows environment - all is OK, but in hosting environment (Linux) - error occured! Maybe this is a bug due to case sensitive namespace?
What is wrong in my code? Help me please.