Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] FE Item View not showing on empty record.

[FIXED] FE Item View not showing on empty record. 19 Apr 2012 13:02 #2058

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
Hi All,

My Project has a Front End View layout - View My Details (Fly) which when I call it from a Menu displays a blank screen - IF there is no existing record to display. Kind of obvious I suppose, however if I call the Edit My Details in a Form I can successfully enter the details.

Summary: if I call a Front End view (Fly) that has no record data it does nothing and I get a blank screen.

Thank you,

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.
Last Edit: 20 Apr 2012 08:59 by admin.
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 19 Apr 2012 17:06 #2061

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
Hi Edward,
What would be your desired output if there is nothing to show ?
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 05:17 #2065

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
Losing my mind, could have sworn I replied to this :unsure:

Anyway, so I guess I have to modify a Controller so that if there is in fact nothing to show (i.e. No records found) it either displays a simple 'No records found' or redirect to another article/page. Only not sure if this is the best solution?

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 07:20 #2067

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
What would be your desired output if there is nothing to show ?
:lol:


Active your error reporting when you get a blank screen and post the error.

Anyway, I think I already solved this one in local, but please report me the error.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 07:44 #2069

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
Am attempting to enable error_reporting using error_reporting(-1); in Component and in template index.php to no success. Also errorlog from CPanel shows no errors visible :huh:

Can you please suggest the best place to insert error_reporting(-1); to ensure errors are displayed?

Thank you,

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 08:04 #2070

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
In the main controller of your component.

mycomponent.php (In FRONT and BACK)

So the errors are visible only when you load your component.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 08:30 #2072

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
Ok, things that make you go Grrrr. Inserted error_reporting in controller back/front. No change, no output, no error.

Jocelyn, just out of curiosity, if the controller is asked to show a Record with no data what should nothing to show ;) look like.

And of course.. any further suggestions? Re build?

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 08:57 #2074

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

Please regenerate.

The only affected files are :

classes/jmodel.item.php
classes/jmodel.list.php
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: edwardcox

Re: FE Item View not showing on empty record. 20 Apr 2012 09:39 #2075

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
As in the Will Smith film: Legend. (thank you!)
Fixed. So answer to the long running question "What should I expect to see? Nothing - an empty layout!".

Edward. :)
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.
The administrator has disabled public write access.

Re: FE Item View not showing on empty record. 20 Apr 2012 09:48 #2077

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
And to refers to another empty totally unusfull feature, I recommend this one :
www.nonumber.nl/extensions/whatnothing
I recommend to read and post a comment ...

By the way I appreciate and highly recommendate NoNumber cool extensions !!

To finally answer you Edward, I totally understand that is an important question to handle all possible pages that the user can access. (Or robots)
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: edwardcox
Time to create page: 0.097 seconds

Get Started