-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
"Show changes" doesn't show edit window and buttons below the changes #319
Comments
The same with MediaWiki 1.37.1, Chameleon 4.0.0 and Page Forms 5.3.4 |
Looks like this has not worked for a long time. I went as far back as the following: |
I think with MediaWiki 1.34 and Chameleon 3 it still worked. |
Hm, this bug causes trouble in our team since edited text sometimes gets lost when one clicks on "Show changes". Any update on this? Thanks a lot! |
The problem also occurs when I click on "Show preview". Do you think it's a Chameleon issue or a PageForms issue? |
Any news on this? |
I think I might have found the issue that was causing this error. Since the code change it seems to be working as expected. I am using Chameleon 4.1.0
If you are using a newer version and still have the same issue it looks like things have changed a bit with I will keep testing but so far it seems to be working for me. |
Ckapop's fix fixes the problem on Chameleon 4.2.1 too, but it introduces another problem. The fix breaks the Maps extension, maps remain greyed out, busy loading.
|
It also breaks editing with Visual Editor, same busy loading type issue. Still investigating this. |
@WouterRademaker, I think I have another workaround if you would like to try it out. It seems the template created by the Page Form previews isn't making it's way down to the Chameleon components. Remove any of the previous changes and start from scratch before making these edits. Let me know if you see any weird behavior. Maps and the VE are rendering for me with this work around.
public function execute() {
// output the head element
// The headelement defines the <body> tag itself, it shouldn't be included in the html text
// To add attributes or classes to the body tag use OutputPageBodyAttributes hook
$this->html( 'headelement' );
echo $this->getSkin()->getComponentFactory()->getRootComponent()->getHtml($this); // Added $this
$this->printTrail();
echo "</body>\n</html>";
}
public function getHtml($tpl = null) { // Added $tpl = null
$ret = '';
foreach ( $this->getSubcomponents() as $component ) {
$ret .= $component->getHtml($tpl); // Added $tpl
}
return $ret;
}
public function getHtml($tpl = null) { // Added $tpl = null
$attribs = [ 'class' => $this->getClassString() ];
$id = $this->getAttribute( 'id' );
if ( $id !== '' ) {
$attribs['id'] = IdRegistry::getRegistry()->getId( $id );
}
$ret = $this->indent() . \Html::openElement( 'div', $attribs );
$this->indent( 1 );
$ret .= parent::getHtml($tpl); // Added $tpl
$ret .= $this->indent( -1 ) . '</div>';
return $ret;
}
public function getHtml($tpl = null) { // Added $tpl = null
// Added if block to set template
if ( !is_null( $tpl ) ) {
$this->setSkinTemplate($tpl);
}
$idRegistry = IdRegistry::getRegistry();
$topAnchor = $idRegistry->element( 'a', [ 'id' => 'top' ] );
$mwIndicators = $idRegistry->element( 'div', [ 'id' => 'mw-indicators',
'class' => 'mw-indicators', ], $this->buildMwIndicators() );
$mwBody =
$topAnchor .
$this->indent( 1 ) . $mwIndicators .
$this->buildContentHeader() .
$this->buildContentBody() .
$this->buildCategoryLinks() .
$this->indent( -1 );
return $this->indent() . '<!-- start the content area -->' .
$this->indent() . $idRegistry->element(
'div',
[ 'id' => 'content', 'class' => 'mw-body ' . $this->getClassString() ],
$mwBody
);
}
// Add this function
public function setSkinTemplate($tpl) {
$this->mSkinTemplate = $tpl;
} |
@ckapop I have tried out the changes, but the only thing I get is a blank page with an empty body. Are these 4 changes the only ones you made? |
@WouterRademaker Sorry, I did forget something. I added 5 above. |
@ckapop, Still a blank page with an empty body. |
@WouterRademaker I get the blank screen with the empty body if I omit step 5. It is working for me with step 5. I recently added $tpl parameter to all the other classes extending Component. just to be safe and it's working. I put the changes here: https://github.com/ckapop/chameleon/tree/pageform-preview-test |
@ckapop you used version 4.1.0 as basis, but I tried the changes on version 4.2.1, that didn't work. I'm now testing your version 4.1.0. |
@WouterRademaker How did your 4.1.0 test go? |
I have added this to "chameleon.css" to separate the preview from the edit form and box. This to avoid getting the edit form next to a long info box. |
@ckapop It might be useful to see what changes are needed on |
Agree. I will investigate this next week when we upgrade to the latest version. |
I have tried to do the changes on 4.3.0: https://github.com/WouterRademaker/chameleon |
@WouterRademaker there seems to be an issue causing createIncompleteSetupTaskNotification to get displayed twice. I am looking into it. |
@ckapop and the PHPUnit tests needs updating. |
@WouterRademaker So the createIncompleteSetupTaskNotification duplication display is also happening in the default Vector skin so I think this is a PageForms issue. |
The bug still with MediaWiki 1.39.8, Chameleon 4.4.0 and Page Forms 5.7.2 |
For editing pages I use
action=formedit
and the extensions PageForms, VirtualEditor and VEForAll. After clicking "Show changes" the changes are shown. But below there is no edit window and there are no buttons.When I switch to the Vector skin the edit window and the buttons show up as expected. So I figured it might be a Chameleon issue.
Using MediaWiki 1.35.5, Chameleon 4.0.0, the latest master versions of PageForms and VEForAll, and the latest version of VirtualEditor 1_35 branch.
The text was updated successfully, but these errors were encountered: