Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] Use of undefined constant DS 14 Jun 2013 07:27 #7471

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Hi Joce,

I am preparing the FrontEnd Interface (J3.0) to present the datas of my Project. (don't worry, I am in Projet mode ;p)

I got an error when creating a New Menu Item in the Menu Manager.

First, Warning :
Notice: Use of undefined constant DS - assumed 'DS' in D:\wamp\www\joomla3.1\administrator\components\com_xxxxxx\models\fields\modal\systeme.php on line 28

Second, Error due to the unknown DS constant :
Fatal error: require_once() [function.require]: Failed opening required 'D:\wamp\www\joomla3.1\administrator\components\com_xxxxxxx\models\fields\modalDSitem.php' (include_path='.;C:\php\pear') in D:\wamp\www\joomla3.1\administrator\components\com_xxxxxxx\models\fields\modal\systeme.php on line

Could you check this point?
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Re: Use of undefined constant DS 15 Jun 2013 08:17 #7475

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes, maybe a bug here.

I may rewrite some parts about the modals and pickable fields.

In facts, when a menu item is created, your component is not fully loaded. (The loader is not called)
Only the pickables fields are loaded.

The solution, you can define DS = DIRECTORY_SEPARATOR in the header of :
models/fields/modal/item.php (base class for pickables fields)

Good catch, must sort it out...
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Use of undefined constant DS 15 Jun 2013 09:36 #7477

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
OK,

yes, of course, it's what I've done to create the Item Menu, without error ...

Hoo, The 15th is today !!! Lot of work for you !

Good luck.

Please Log in or Create an account to join the conversation.

Re: Use of undefined constant DS 15 Jun 2013 11:46 #7478

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I will migrate in thoses few days, not all at once.

Today (now), I am migrating and processing the last clone.
Means that you will now work in the new website (still .net)
.pro will still be available for the forum, but not for the builder.

Still are some issues, but this will always continue all the way long.
Now it is the time for changes...
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Use of undefined constant DS 18 Jun 2013 16:15 #7561

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.

Now, the loader is instancied when you try to reach a field. Modal picker, or simple field.

So, from the menu item, your component loader is called.
With the loader, the classes are not all loaded in memory, only registered.

It means that if you need one of your component class, the loader knows where to find the file. In this case, only the used PHP classes are loaded in memory.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Use of undefined constant DS 19 Jun 2013 03:29 #7570

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
I have to make fews changes...
I will check this with the next component update...

thank you.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.067 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started