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

Section called "Authors" breaks data source edit pages #671

Closed
brendo opened this issue Jun 16, 2011 · 6 comments
Closed

Section called "Authors" breaks data source edit pages #671

brendo opened this issue Jun 16, 2011 · 6 comments
Milestone

Comments

@brendo
Copy link
Member

brendo commented Jun 16, 2011

Migrated from Symphony Issue 623

@ahwayakchih

When one of the sections is called "Authors", Data Source edit pages are broken.

"Parameter Output" and "XML Output" options show information related to a section, no matter which source is selected (section called "Authors" or System/Authors).

I found it on Symphony 2.2, did not test on 2.2.1 (did not have enough time, sorry). To reproduce:

  • Create section called "Authors" with "Author" field (as first field, but it may be irrelevant),
  • Create data source that should select authors (system/symphony, not from the new section you have just created),
  • (not sure if needed, but this how i found the bug) add filter by "First name" and "Last name" (i used the same parameter in both, because parameter was comma separated list of names),
  • (also not sure if needed) set required parameter,
  • "Parameter Output" and "XML Output" show options relevant to the "Section/Authors" and not "System/Authors".

Hope that helps :).

@brendo

Got it, this is down to Symphony's javascript and how it handles removing/displaying options on the Datasource Editor page.

Any clever ideas?

  • Renamed Authors to something more specific, Symphony Authors?
  • Reserve Sections (and Navigation) from Datasource names
  • Engineer the Javascript to be more robust, perhaps making use of data- attributes instead of the text.

@nilshoerrmann

This cannot really be solved in a nice way without rewriting the data source editor javascript. We have been talking about that while working on 2.2 and decided to leave the concept as is and wait for Symphony 3 to improve the editor.

It's still possible to setup the data source correctly when editing the file directly. So my vote would be to highlight this as a known bug but not fix it in the Symphony 2 branch.

@brendo

Fair enough, I had a go myself for the last 30 minutes and didn't come up with much luck.

Authors, while we might not use it often, would probably be a common section name in a Book/Publishing website.

A more common example of this problem could be a site using the name 'Navigation' as the same issue will occur. I know at work we prefix Navigation with System: Navigation, I was never aware of why, but this may very well be the reason.

@nilshoerrmann

One thing we should think about is using data attributes to handle the connection between the select box and the interface components that should be shown or hidden. This way we can make sure that there are no interferences between a custom section name and a default source without using silly long names for the system components.

@brendo
Copy link
Member Author

brendo commented Nov 12, 2011

Hey @nilshoerrmann, when the changes for Pickable were made, did we take into account data- attributes to prevent this issue (as per your last comment)?

@nilshoerrmann
Copy link
Contributor

It all depends on how the names are setup in the PHP - Pickable works id based and takes what is given in the HTML. As the entire concept of the data source editor changed, this issue shouldn't be a problem anymore.

@brendo
Copy link
Member Author

brendo commented Nov 12, 2011

As the entire concept of the data source editor changed, this issue shouldn't be a problem anymore.

As in, the issue has been resolved already? Or it will be resolved when the datasource editor work is done?

@nilshoerrmann
Copy link
Contributor

The latter. It all depends on the new editor.

@brendo
Copy link
Member Author

brendo commented Nov 12, 2011

Sure, in that case I'll just link to the issue from the DS Editor issue so we don't forget :)

@nilshoerrmann
Copy link
Contributor

Closing this issue: As soon as we make use of Pickable in the Data Source editor, this problem will be gone. So issue #757 will handle this.

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

2 participants