Dynamic Get Compile issue/question #38

Closed
opened 2017-02-02 06:37:49 +00:00 by mwweb · 7 comments
mwweb commented 2017-02-02 06:37:49 +00:00 (Migrated from github.com)

I've been "fighting" with this for the past 2 days, and finally decided to ask. I've watched the video tutorials, and I have looked (mostly duplicated) your dynamic gets for Sermon Distributor. However, when I compile only the main query is showing in the model. Below is what I've done (I will actually give my table names/fields here that I'm using).

Main table in get: property.
Join View Table: Agents
"Linked" fields: b.id (from agents) to a.agent, single, join left.

I then added this get to a site view, and when I compile, it's not creating the queries. The only query that I am finding in the model is:

		if (empty($table->ordering))
		{
			$db = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select('MAX(ordering)')
				->from($db->quoteName('#__mostwantedrealestate_property'));
			$db->setQuery($query);
			$max = $db->loadResult();

			$table->ordering = $max + 1;

If I go into the admin view and change the single property name (from property to property1), then it creates a second single view on compile (property and propertyone). Propertyone has the queries, but I can't find where it is creating property from that is incorrect.

Any suggestions on where to look?

I've been "fighting" with this for the past 2 days, and finally decided to ask. I've watched the video tutorials, and I have looked (mostly duplicated) your dynamic gets for Sermon Distributor. However, when I compile only the main query is showing in the model. Below is what I've done (I will actually give my table names/fields here that I'm using). Main table in get: property. Join View Table: Agents "Linked" fields: b.id (from agents) to a.agent, single, join left. I then added this get to a site view, and when I compile, it's not creating the queries. The only query that I am finding in the model is: if (empty($table->ordering)) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') ->from($db->quoteName('#__mostwantedrealestate_property')); $db->setQuery($query); $max = $db->loadResult(); $table->ordering = $max + 1; If I go into the admin view and change the single property name (from property to property1), then it creates a second single view on compile (property and propertyone). Propertyone has the queries, but I can't find where it is creating property from that is incorrect. Any suggestions on where to look?
mwweb commented 2017-02-02 08:57:15 +00:00 (Migrated from github.com)

I did a little more digging, and found that if, in the component configuration, Edit/Create site view is set to yes in the admin views, then this is happening. If set to no, it works fine, and creates all of the necessary queries in the model. This is only happening on a single record. This basically is making the frontend editing ability unusable. It's something between the JModelItem and JModelAdmin that is the issue.

Is this intended behavior, or a "glitch"?

I did a little more digging, and found that if, in the component configuration, Edit/Create site view is set to yes in the admin views, then this is happening. If set to no, it works fine, and creates all of the necessary queries in the model. This is only happening on a single record. This basically is making the frontend editing ability unusable. It's something between the JModelItem and JModelAdmin that is the issue. Is this intended behavior, or a "glitch"?

Due to the nature of the complexity I would have to take a look at this, I have countless components with front-ends and even editing views, and I do not get this issue. So this is not normal.

I think we could with teamviewer and skype get this sorted out in no time :) please contact me on VDM with a ticket.

Due to the nature of the complexity I would have to take a look at this, I have countless components with front-ends and even editing views, and I do not get this issue. So this is not normal. I think we could with teamviewer and skype get this sorted out in no time :) please contact me on VDM with a ticket.

Please make sure that the edit view and the display view does not have the same name on the front-end, yet if the issue continues please let me help you via teamviewer....

Please make sure that the edit view and the display view does not have the same name on the front-end, yet if the issue continues please let me help you via teamviewer....
mwweb commented 2017-02-02 19:43:42 +00:00 (Migrated from github.com)

Oddly enough, your comments got me to looking deeper into what I had in place, and I discovered that in the admin view, under Permissions, I had core.edit. As soon as that was removed, it started working.

Oddly enough, your comments got me to looking deeper into what I had in place, and I discovered that in the admin view, under Permissions, I had core.edit. As soon as that was removed, it started working.

I don't think that should cause this, all that means is that is uses the global permission to check if you may edit it, where the view.edit creates a permission check just for that view.

I don't think that should cause this, all that means is that is uses the global permission to check if you may edit it, where the view.edit creates a permission check just for that view.

Are you using the latest version of JCB? We have been making huge improvements on the compiler.

Are you using the latest version of JCB? We have been making huge improvements on the compiler.
mwweb commented 2017-02-04 05:15:15 +00:00 (Migrated from github.com)

I've been using 2.2.6 on my localhost. I'm doing a full backup of my localhost site, then will be upgrading to 2.3.0.

I've been using 2.2.6 on my localhost. I'm doing a full backup of my localhost site, then will be upgrading to 2.3.0.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#38
No description provided.