Call to a member function get() on null #45
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#45
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm baffled on this one. I have several site views, and most do some form of get from the component parameters. They all appear to work, except one view. Below is a sample of the code, and this is failing the
<?php if($this->params->get('show_state_title') == '1'){?>
, generating a Call to a member function get() on null. I've compared to my other views, and some from Sermon Distributor, and can't see any issues. I have also checked my parameters, and the parameter is in the code.Have you ever encountered an issue like this, or have any thoughts as to what to look at?
Are you hiding the "<?php" on purpose or is it missing?
Grrr. It stripped out some of the coding when I posted. Here it is again attached, since it keeps stripping out the code, even when using the code tags.
Well without seeing the rest of the code from the
model->view.html.php->view
it is very hard to debug...All I can think is that you somewhere above this code overwritten
$this->params
somehow...So take a look at that, then also insure that you make use of the better method instead of the
}
use:
Like so:
This was really "weird", but your statement about model->view.html.php, got me looking at the file, and found that the following isn't being added to function display($tpl = null)
Because that didn't get added to the code for some reason, once all instances of $this->params was changed to $this->state->params then it started working. It's a work around so I can finish working on this view, but still doesn't explain why that code didn't get added.
That is not possible... the view.html.php for site views are build from these two files
And as you can see those lines are hard coded into the file, so you will need to check those files in your local install to see if they were changed.
They don't show as changed, when copying the code from Github and comparing to localhost version. It may not be possible, but it is doing this. Here is the last push of the code that I submitted to my bitbucket repository.
8f335f4140/site/views/state/view.html.php
?at=defaultHey but that code is in that repos, so what is the issue?