0
Welcome Guest! Login
0 items Join Now

Warning: DOMDocument::importNode(): ID system-message already defined

    • gonzo80's Avatar
    • gonzo80
    • Newbie
    • Posts: 5
    • Thanks: 0

    Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • So, I read the posts and ... libs/phpQuery.php and the error was patched with @. But the warning still shows.
      I found and intersting error arround line 4267. If you look quick you'll miss the typos.

      /**
      * Enter description here...
      *
      * @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
      */
      public function parent($selector = null) {
      $stack = array();
      foreach($this->elements as $node)
      if(
      $n ode->parent Node &&!$this->elementsContainsNode(
      $node->parentNode, $stack))
      $ stack[] = $node->parentNode;
      $this->elementsBackup = $this->elements;
      $this->elements = $stack;
      if ($selector) $this->filter($selector, true);
      return $this->newInstance();
      }

      Not exactly sure what the correct fix is other than the typos since there are braces missing so I won't post one.
    • Last Edit: 8 years 7 months ago by gonzo80. Reason: Typos
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • make sure you have latest gantry and roksprocket installed.

      if still no good Please would you post your URL, superuser id and pswd in the secure tab of your post and i'll have a look for you.

      also Please post your FTP logon, password and FTP URL in the secure area of your post.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • gonzo80's Avatar
    • gonzo80
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • Well, it is not my server so, I have to get permission.
      However, one week old or less site with recently downloaded template from your site.
      When reviewing the code and finding the error above in one of implemented versions of phpquery, I found the same error in the other versions.
      I also found the error supression missing in one of the files but no matter.
      While correcting the above, because of the pattern established in the source code; the lack of braces in short if and foreach sections of code, I noticed my ide trashed the above code layout and caused spacing issues until the braces were inserted properly.
      So, I believe the ide the programer was using at the time caused the above error.
      While I am an advocate for efficient code, it is easier to troubleshoot complex code with the extra "punctuation".
      After having been the victim of this same issue, I have my ide setup to insure this type of issue causes an ide error.
      Sorry for the dissertation.
      MSIT with 20+ years programming experience.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • I checked the code in /libraries/gantry/libs/phpQuery.php and I see nothing wrong. The code does not match the line number that you gave above though and (when I did find the equivalent code) it does not have the issues that your pasted code does above? So I think the issue is more likely the tool that you are using to view the file and/or how that file was put there.

      We're talking Gantry 4 - right? Which template?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • gonzo80's Avatar
    • gonzo80
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • rt_anacron Joomla 3.4 Gantry 4
      You are correct although it kinda validates my point.
      I looked at a backup of it with notepad++ and my ide tried to format the code correctly.
      So, my next question is... Is it just the "if statement" in the foreach.

      Also:
      libraries\rokcommon\phpQuery.php line 591 is
      $return[] = $this->document->importNode($node, true);
      } else {

      libraries\gantry\libs\phpQuery.php line 590 is
      $return[] = @$this->document->importNode($node, true);
      } else {

      Thanks in Advance
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • I don't understand why you are editing the code? Just install gantry latest and roksprocket latest and those files will get overwritten with the correct code. There's no need for you to be editing any code at all.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • gonzo80's Avatar
    • gonzo80
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • Well this all started, when the customer (long time friend & business associate) asked for a feature not included in this theme.
      My dev enviroment is set up to show all errors.
      So, when I inserted the @ on line 590 to reduce the noise, the ide tried to format the code properly; the if statements were unaffected (other than a warning for each one) but some of the unbraced foreach statements blew up.
      So rather than introduce more issues, I wanted to fix the local code and move on.
      I thought it was polite to pass along the experience I had.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Warning: DOMDocument::importNode(): ID system-message already defined

    Posted 8 years 7 months ago
    • You should avoid changing any of our original templates files otherwise template updates will overwrite those changes. Any CSS changes should be done with a custom CSS file, any structural changes should be done with overrrides (not changing original templates files). Also, you should set your editor such that it is not altering the code by reformatting/tidying/correcting the code. The code in the template files is correct and stable - changing it will often lead to errors and make it difficult for use to support you.

      My opinion is still that you should install latest gantry and roksprocket to reinstate the code as we provide it, there should be no need to edit any of our code. If you feel that there is then you should be using overrides to achieve that.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.044 seconds