IE-related problems #94

Guite opened this Issue Mar 16, 2012 · 6 comments


None yet

2 participants

Guite commented Mar 16, 2012

This is about Content version 3.2, but probably affects version 4 as well.

Problem 1:
If I try to create a sub page in Internet Explorer I get the following message: Error! Cannot create sub-page without parent page ID.

Problem 2:
If I try to increase indention in the page tree (to make a main page becoming a sub page) the page reloads, but nothing happened to the selected page.

I suspect that there is a general issue with Internet Explorer related to the form postback functionality (which is used for the whole context menu which can be shown by clicking on the blue arrow).

espaan commented Mar 19, 2012

Hi, this is indeed an issue with IE.
See also #76

Somehow the id's that are needed for the context item actions do not work.

espaan commented Jun 10, 2012

Within IE the commandArgument with the in it is not coming through. This part is being dealt with in pnForm (or Form) with the JS part in pnform.js. Checking why IE does not recognize the
Have to check why FF and Safari for instance do have this commandargument filled in.

espaan commented Jun 12, 2012

Tracked it down to pnformcontextmenuitem.php

There is defined in the zk12x code (same is still there in the 1.3.x code)

    // Called by pnForms framework due to the use of pnFormGetPostBackEventReference() above
    function raisePostBackEvent(&$render, $eventArgument)
        $contextMenu =& $this->getParentContextMenu();

        $hiddenName = "contentMenuArgument" . $contextMenu->id;
        $commandArgument = FormUtil::getPassedValue($hiddenName, null, 'POST');

        $args = array('commandName' => $eventArgument, 'commandArgument' => $commandArgument);
        $render->pnFormRaiseEvent($contextMenu->onCommand == null ? 'handleCommand' : $contextMenu->onCommand, $args);

The commandargument is obtained from the hidden field contentMenuArgumentcontentTocMenu which is defined in the form framework for contextmenus. This field should obtain the value of the current via Javascript (pnform.js function pnForm.contextMenu.showMenu) when a menu item is called on the context menu. This seems to work fine. However in IE the commandargument in the function raisePostBackEvent is not filled, when it is nicely being filled in FF and Safari etc.

When I fill in 0 or 1 for instance for the defaul.t of the getPassedValue of the hiddenname then it works ok calling for instance newsubpage with that value.

It seems to be a general IE issue with obtaining form values from a hidden div. The context menu is hidden with display:none and then the code tries to get the formvalue for the page id which is not obtainable.

espaan commented Jun 20, 2012

The solution is to adjust block.pnformcontextmenu.php -> renderBegin function

            $hiddenName = "contentMenuArgument" . $this->id;
            $html = "<div id=\"{$this->id}\" class=\"$cssClass\"$attributes><div><input type=\"hidden\" name=\"$hiddenName\" id=\"$hiddenName\" /></div><ul>";
            return $html;


            $hiddenName = "contentMenuArgument" . $this->id;
            $html = "<div><input type=\"hidden\" name=\"$hiddenName\" id=\"$hiddenName\" /></div><div id=\"{$this->id}\" class=\"$cssClass\"$attributes><ul>";
            return $html;

So taking the hidden form field which holds the current argument outside the hidden div of the contextmenu. This works fine in IE and FF.

Same can be done in the Zikula_Form_Block_ContextMenu::renderBegin function of the zk1.3 code.

espaan commented Jun 20, 2012

See zikula/core#423 for the code in Zikula 1.3.x

espaan commented Jun 25, 2012

The 1.3 code is merged in the release-1.3 code, so will get into the source with a new release.

For 1.2.x there is no such issue system any more. You can change

line 114:

            $html = "<div id=\"{$this->id}\" class=\"$cssClass\"$attributes><input type=\"hidden\" name=\"$hiddenName\" id=\"$hiddenName\"/><ul>";


            $html = "<input type=\"hidden\" name=\"$hiddenName\" id=\"$hiddenName\"/><div id=\"{$this->id}\" class=\"$cssClass\"$attributes><ul>";

I will close the ticket. I would really like to release a new zk 1.2.10 version with this fix in it, but It's not high priory for the team

@espaan espaan closed this Jun 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment