3

In Config.xml of an Extension i have seen <drewrite> tag used to rewrite the block. What is the difference between <rewrite> and <drewrite> tag?

1
  • I doubt this is typo or was used in old version. Jun 24, 2015 at 11:30

5 Answers 5

4

I've never seen this in any core file or custom extension. I'm willing to bet it's a typo.

Can you verify that the rewrite is not actually being applied?

3
  • i have edited the question and added the related code
    – Piyush
    Jun 24, 2015 at 11:23
  • 1
    Search your code base for the word drewrite all lower case. There is nothing vanilla as far as I can see, but it's possible some custom module is accessing that part of the config for strange and unusual reasons. Jun 24, 2015 at 11:26
  • I did a grep of a Stock magento Install for drewrite with the following command grep -R "drewrite" app/code/core It returned no results
    – NathanielR
    Jun 24, 2015 at 11:32
2

I go through the Whole code, the <drewrite> is a custom node created to used by observer.

2

drewrite does nothing. My bet is, that "d" stands for "disabled" or maybe "deprecated" and the developer found this more appropiate than using XML comments or just removing the code that's not used anymore.

It goes without saying that this is not good practice.

1

The difference is <rewrite> exists in magento configuration, <drewrite> does not. Probably just a typo...

0

"drewrite" is not Magento specific. Some extensions like "Aw/Blog" use the node "drewrite" on configuration dependence. That means, if some extension config value is present, the extension uses the event observer to rename the "drewrite" node to "rewrite", so that the class rewrite can happen during runtime.

"drewrite" could stand for dynamic rewrite.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.