Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias attribute not working in FEE #6

Closed
4 tasks done
tsarma opened this issue Dec 22, 2016 · 5 comments
Closed
4 tasks done

Alias attribute not working in FEE #6

tsarma opened this issue Dec 22, 2016 · 5 comments
Assignees
Milestone

Comments

@tsarma
Copy link

tsarma commented Dec 22, 2016

Checklist before I submit this issue report

I confirm that:

My environment is:

Key Value Comments
PHP version: 5.6
Contao version: 3.5.19
MetaModels version: dev-hotfix/alpha-15
Installation via composer: yes
Installed MetaModels packages: metamodels/core, metamodels/bundle_all,
MetaModels/contao-frontend-editing dev-hotfix/checkbox
DCG version: dev-hotfix/beta-39

Issue description

Attribute alias is working only in backend.

alias

In FEE alias attribute is not generated.

@discordier discordier added the bug label Dec 22, 2016
@discordier discordier added this to the 2.0.0 milestone Dec 22, 2016
@richardhj
Copy link
Member

The reason might that the alias attribute is not in the FEE input mask. The alias generation will not be triggered because the alias attribute does not pass the isAttributeSet().
For my purposes, I could quickfix it with this:

/**
 * Class FrontendEditingItem
 * @package MetaModels
 */
class FrontendEditingItem extends Item
{

	/**
	 * Override this function as we want to make sure that all attributes get notified by saving the item.
	 * 
	 * @param string $strAttributeName
	 *
	 * @return true
	 */
	public function isAttributeSet($strAttributeName)
	{
		return true;
	}
}

@discordier
Copy link
Member

I guess we must rewrite the save handler of the alias attribute to handle the model pre persist event of dc-general. This should solve the problems then.

@zonky2
Copy link
Contributor

zonky2 commented Aug 28, 2017

same question to generate alias without inside input mask: MetaModels/attribute_alias#21

@richardhj
Copy link
Member

The alias attributes works as it is supposed to be. The alias generation within the modelSaved() method will be triggered by the dc-general-frontend as well.
The alias generation works even if the alias field is not part of the FE input mask (@zonky2).

@MiniModel
Copy link
Member

This issue has been labeled with testing but got no feedback.

We are reliant on feedback to prove a ticket fixed as we can not tell if the ticket has been
resolved if we receive no feedback.
I will close this ticket now, as I assume it has been resolved.
If the ticket should still be valid, please feel free to reopen it.

@tsarma could you please have a final look at this and tell if your issue has been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants