var url = 'index.php?option=com_kr_books_reviews&view=reviews_cancel_reasons&task=reviews_cancel_reason.edit&id='+value+'".$refJ."';
System information (as much as possible)
OS Name & Version: WAMP/LAMP
MySql Version: 5.5.56
Apache Version: 2.4.27
PHP Version: 7.1.9
Joomla Version: 3.8.6
JCB Version: 2.7.0
Browser: Chrome
Additional comments
It appears for some reason, that the component name isn't getting used as set in the custom field parameters and it is defaulting to the current component.
### Steps to reproduce the issue
- Have 2 different components:
- Component 1 - com_kr_books_system - has the values to lookup/add
- Component 2 - com_kr_books_reviews - has the custom field that looks up against component 1
- Create a CUSTOM field and set:
- table = '#__kr_books_system_review_cancel_reason'
- component="com_kr_books_system"
- view="reviews_cancel_reason"
- views="reviews_cancel_reasons"
- value_field="reason_name"
- key_field="id"
### Expected result
in /administrator/components/com_kr_books_reviews/models/fields/cancelreason.php in the getInput() function,
around line 85:
```
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_KR_BOOKS_REVIEWS_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_kr_books_system&view=reviews_cancel_reason&layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
```
and around line 117:
`var url = 'index.php?option=com_kr_books_system&view=reviews_cancel_reasons&task=reviews_cancel_reason.edit&id='+value+'".$refJ."';`
### Actual result
around line 85:
```
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_KR_BOOKS_REVIEWS_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_kr_books_reviews&view=reviews_cancel_reason&layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
```
and around line 117:
`var url = 'index.php?option=com_kr_books_reviews&view=reviews_cancel_reasons&task=reviews_cancel_reason.edit&id='+value+'".$refJ."';`
### System information (as much as possible)
- OS Name & Version: WAMP/LAMP
- MySql Version: 5.5.56
- Apache Version: 2.4.27
- PHP Version: 7.1.9
- Joomla Version: 3.8.6
- JCB Version: 2.7.0
- Browser: Chrome
### Additional comments
It appears for some reason, that the component name isn't getting used as set in the custom field parameters and it is defaulting to the current component.
I am getting an error once on that 'external' page (in the 'system' component) upon either saving a new entry or closing the form:
404 View not found [name, type, prefix]: reviews_assignment, html, kr_books_systemView
I haven't had a chance yet to track that down, but looks like it is somehow loosing it's referral location.
Actually, possibly responded too quickly.
I am getting an error once on that 'external' page (in the 'system' component) upon either saving a new entry or closing the form:
404 View not found [name, type, prefix]: reviews_assignment, html, kr_books_systemView
I haven't had a chance yet to track that down, but looks like it is somehow loosing it's referral location.
Hmmm this could be an issue. Will have to look at improving the whole referral concept. For now it seems like when targeting a external component, to remove referrals.
Hmmm this could be an issue. Will have to look at improving the whole referral concept. For now it seems like when targeting a external component, to remove referrals.
Okay please test, as I have update the concept to use the default return option if a external component is detected in the custom field. Hope this resolves the issue, let me know.
Okay please test, as I have update the concept to use the default return option if a external component is detected in the custom field. Hope this resolves the issue, let me know.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce the issue
Expected result
in /administrator/components/com_kr_books_reviews/models/fields/cancelreason.php in the getInput() function,
around line 85:
and around line 117:
var url = 'index.php?option=com_kr_books_system&view=reviews_cancel_reasons&task=reviews_cancel_reason.edit&id='+value+'".$refJ."';Actual result
around line 85:
and around line 117:
var url = 'index.php?option=com_kr_books_reviews&view=reviews_cancel_reasons&task=reviews_cancel_reason.edit&id='+value+'".$refJ."';System information (as much as possible)
Additional comments
It appears for some reason, that the component name isn't getting used as set in the custom field parameters and it is defaulting to the current component.
Hi, can you please provide the XML field definition that you wrote to build the custom field?
Here's the xml field definition for the custom field. This is in the com_kr_books_reviews component:
Okay I see the bug... will fix it in next release 👍
Okay the patch is out, please test the latest staging branch to see if the issue is resolved at your side.
Yes. Works perfectly now.
Thanks!
Actually, possibly responded too quickly.
I am getting an error once on that 'external' page (in the 'system' component) upon either saving a new entry or closing the form:
404 View not found [name, type, prefix]: reviews_assignment, html, kr_books_systemView
I haven't had a chance yet to track that down, but looks like it is somehow loosing it's referral location.
Hmmm this could be an issue. Will have to look at improving the whole referral concept. For now it seems like when targeting a external component, to remove referrals.
Okay please test, as I have update the concept to use the default return option if a external component is detected in the custom field. Hope this resolves the issue, let me know.