FANDOM


  • 452

    I'm editing MediaWiki:Noarticletext with some more useful information than the default text, and one thing I added was a link to search for the page name.

    However, clicking on the search link is giving the "Create a new article" popup as if I clicked the "create this article" link.

    I did a test by adding a working internal link and a full external link, and all links on the page are doing the same thing.

    Is there a way to stop this?

    edit: I just checked and while it is a problem on half-life.wikia, it isn't a problem on tardis.wikia, because the "create a new article" dialog appears to be disabled.

      Loading editor
    • It's an annoying design decision in Wikia's code, there's something in there that attaches a click handler to every single link on the page.

      https://github.com/Wikia/app/blob/dev/extensions/wikia/CreatePage/js/CreatePage.js

      This has been a problem for quite a while, you can try adding counter JS to fix it.

      $(window).load(function fixCreatePage() {
          $(window).off('load', fixCreatePage);
          $('#mw-content-text > .noarticletext a').off('click');
      });

      If you want to keep the popup helper thing on one or more of the links then try:

      $(window).load(function fixCreatePage() {
          $(window).off('load', fixCreatePage);
          $('#mw-content-text > .noarticletext a').not('.keep-create-page *').off('click');
      });

      And write <span class="keep-create-page">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Create this page]</span>.

        Loading editor
    • For the record, I reported this bug to Wikia back in July, here's the old forum thread I created about it. Both Brandon and DaNASCAT were not able to reproduce it at first, but after a string of email replies and that forum thread, eventually DaNASCAT saw it. So it should be already ticketed. The support request was #43403 if that helps.

        Loading editor
    • How ... odd. Yeah I can only confirm that we definitely have CreatePage outright disabled by Staff. Maybe one of the reasons that this never got fixed is that no one was able to prove the source of the error.

      Perhaps by submitting an error report that demonstrates that it has to do with the CreatePage dialogue box, we can actually get this puppy fixed. It's obviously a bug, and it's directly connected to CreatePage.

      If it helps, the exact support request that turned off the "create a new article" flow is #21250, entitled 'Getting rid of "create a new article" flow'. Maybe that specificity will help them figure out how it was turned off, which will then lead to a quicker resolution.

        Loading editor
    • 452

      Thanks everyone!

      Lunarity, I see the problem on line 142, so I've contacted staff with that detail in the hopes it can get fixed.

      I'll try:

         $('#mw-content-text > .noarticletext a').not('a[href*="action=edit"]').off('click');
      

      edit: Yes, that works perfectly, CreatePage is disabled for all links within the "noarticletext" class that do not contain "action=edit".

        Loading editor
    • I have submitted a code change that should fix this issue at the next code release. Thanks for your patience!

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message