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

Contextual menu not working when alias present on the same page #5382

Closed
petrklus opened this issue Jun 8, 2016 · 7 comments
Closed

Contextual menu not working when alias present on the same page #5382

petrklus opened this issue Jun 8, 2016 · 7 comments

Comments

@petrklus
Copy link

petrklus commented Jun 8, 2016

Hi,

I am having issue when using alias to the content on the same page as the content itself.

The overview of the content structure is following:

Tabs container

  • tab1
    • alias to contentrow2
    • alias to contentrow3
  • tab2
    • contentrow2
  • tab3
    • contentrow3

However, as soon as I create the aliases, I can no longer expand/collapse the content row via the arrow (the expand all option still works), neither can I use the contextual menu (I can use the edit / + buttons).

As soon as the alias is deleted, the contextual buttons start working again for the particular content row.

I can PM login details for a stage server with the issue present on one of the pages. I can also easily reproduce it on my development machine. Sample screenshot:

image

The offending row is the "Content row" plugin, which cannot be expanded when the alias is present. Works just fine when the alias is removed.

@czpython czpython assigned czpython and unassigned czpython Jun 8, 2016
@czpython
Copy link
Contributor

czpython commented Jun 8, 2016

@petrklus
Thanks for reporting.
I believe this is a known issue with the Alias plugin /cc @vxsx
We're planning to refactor this plugin because of this and other issues.

@vxsx
Copy link
Contributor

vxsx commented Jun 9, 2016

It is a known issue sadly. This happens because the "Content row" plugin is initialized twice on the same page, and so it has 2 click handlers that toggle it, so first one opens it and second one closes. I can provide a small patch for this specific issue for 3.3.1 (as i've sorted it out while working on something else), but all the other problems with it (like when you try to move it when alias plugin is on same page) will stay unsolved until we refactor.

@FinalAngel
Copy link
Member

@petrklus are you eventually able to help us out there?

@petrklus
Copy link
Author

petrklus commented Jun 9, 2016

@FinalAngel I am happy to test / evaluate a fix, however, I am not yet at 3.3 and it may take a week or two to upgrade.

@FinalAngel
Copy link
Member

@petrklus helping on testing/evaluating will definitely be a big plus. Also general improvements on the frontend would be very welcome.

vxsx added a commit to vxsx/django-cms that referenced this issue Jul 1, 2016
When alias plugin is initialised it also initialises it's children.
If the alias plugin is on the same page as the plugin that is being
aliased this leads to the event handlers bound twice. So if you
try to toggle context menu or nested plugins in structure mode the
operation would be ran twice and would technically fail. This
commit stops initialisation of the plugin that already has been
initialised.

Essentially this is a backport of changes from django-cms#5429
Ref: django-cms#5382
@vxsx
Copy link
Contributor

vxsx commented Jul 1, 2016

@petrklus could you please check if #5486 fixes things for you?

@vxsx vxsx added this to the 3.3.1 milestone Jul 1, 2016
vxsx added a commit to vxsx/django-cms that referenced this issue Jul 4, 2016
When alias plugin is initialised it also initialises it's children.
If the alias plugin is on the same page as the plugin that is being
aliased this leads to the event handlers bound twice. So if you
try to toggle context menu or nested plugins in structure mode the
operation would be ran twice and would technically fail. This
commit stops initialisation of the plugin that already has been
initialised.

Essentially this is a backport of changes from django-cms#5429
Ref: django-cms#5382
@czpython
Copy link
Contributor

czpython commented Jul 8, 2016

Fixed by #5486

@czpython czpython closed this as completed Jul 8, 2016
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

4 participants