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

TOPIC:

Can not view layout 26 Aug 2013 09:14 #10907

  • teg
  • teg's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
In project Tour Management
I can not view layout Order Item in backend when running sandbox
It shows a message:
Fatal error: Cannot use object of type JForm as array in /home/cook/sites/www.j-cook.net/public_html/sandbox/cms30/administrator/components/com_demo9509/views/orderitem/view.html.php on line 92
Error : Cannot use object of type JForm as array


Please help me.

How can i fix it?
Thanks

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

Can not view layout 26 Aug 2013 10:44 #10909

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I have checked you project.


This is because you have confusion in the table's names and aliases.
In TABLE ALIAS, the '_' (underscore) is not allowed.
I know, still there is a little issue, and sometimes you can do it.
Please remove all underscores there.

Table : order_item
Alias becomes : 'orderitem'
But this is already used by the 'order' table.
You have a big confusion there.

I suggest you :

Table ORDERS :
Alias table : orders
Alias item : order

Table ITEMS
Alias table : items
Alias item : item

Well, Using 'order(s)' and 'item(s)' is quite confusing also because are developper language, but you can because they are not reserved.

I already answered to you few days (or week) ago.

If you need help, I can do it
Coding is now a piece of cake

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

Can not view layout 27 Aug 2013 02:39 #10915

  • teg
  • teg's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
Hi,
We had designed database before applied to J-Cook.
1. And we had some tables have to have the '_' (underscore).
But like you said: "In TABLE ALIAS, the '_' (underscore) is not allowed."

That means: we can't not name table that has the underscore, can we?

2. We need to have Order_item table, but this alias have been used by Order table.
so, why J-cook don't use the name of views like Joomla?
Ex: Article: With the collection, it uses: articles
and with the item, it uses: article

As this way, in this project, Order table will have 2 views: orders and order
and Oder_item table have 2 views: orderitems and orderitem.

If, i want to fix that issue, i have to change the alias of table, that's mean i have to change the name of table order_item?

Thanks and
Regards

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

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

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started