# extending mautic

**URL:** <https://forum.mautic.org/t/extending-mautic/2732>\
**Category:** Development\
**Created:** [November 8, 2015, 8:32pm UTC](https://forum.mautic.org/t/extending-mautic/2732 "2015-11-08T20:32:19Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 18, 2015, 10:02am UTC](https://forum.mautic.org/t/extending-mautic/2732/21 "2015-11-18T10:02:55Z")

</div>

No idea. Both environments should behave the same when the cache is cleared. In addition, the dev mode use the unmerged assets (JS and CSS). Prod environment requires to build (merge, minify) them first. Dev environment shows the PHP errors in the browser and prod logs them.

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 18, 2015, 10:15am UTC](https://forum.mautic.org/t/extending-mautic/2732/22 "2015-11-18T10:15:43Z")

</div>

okay bro , thank you 🙂

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 28, 2015, 9:11am UTC](https://forum.mautic.org/t/extending-mautic/2732/23 "2015-11-28T09:11:00Z")

</div>

hi escopecz 🙂 i want to ask you something. i wrote a jquery code it works and all is fine when trying it with mautic it doesnt work untill i remove this part of code $view-\>extend(‘MauticCoreBundle:Default:content.html.php’); the story that this line is so important for mautic view and cant be eliminated so how can i make it works with jquery ?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 28, 2015, 9:13am UTC](https://forum.mautic.org/t/extending-mautic/2732/24 "2015-11-28T09:13:47Z")

</div>

How is your jQuery code look like? Is there some error message? Provide please as much information as you can so I can help you fast without asking additional questions.

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 28, 2015, 9:21am UTC](https://forum.mautic.org/t/extending-mautic/2732/25 "2015-11-28T09:21:06Z")

</div>

no errors at all. it works in my local server 100% , even when i place it in mautic xxxx.html.php it works fine but i have to delete this line code $view-\>extend(‘MauticCoreBundle:Default:content.html.php’); (the problem is this line code is related to the mautic interface) so i cant remove it .

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 28, 2015, 9:26am UTC](https://forum.mautic.org/t/extending-mautic/2732/26 "2015-11-28T09:26:24Z")

</div>

Hey dude, you basically wrote the same as in the previous message and didn’t answer my questions. I’ll stop answering you if the conversation won’t be productive.

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 28, 2015, 10:28am UTC](https://forum.mautic.org/t/extending-mautic/2732/27 "2015-11-28T10:28:15Z")

</div>

bro you asked me if i have an error i told you i have no errors at all , ok check jquery code please  
[https://drive.google.com/open?id=0By1rOlT63sKGTkNBUW1iT0RzVjA](https://drive.google.com/open?id=0By1rOlT63sKGTkNBUW1iT0RzVjA)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 28, 2015, 11:08am UTC](https://forum.mautic.org/t/extending-mautic/2732/28 "2015-11-28T11:08:02Z")

</div>

When I look at your code:

1. Why do you load jQuery again when Mautic loads it by default?
2. Use ‘mQuery’ instead of ‘$’
3. Load javascript the same way as all other bundles do. If you want to load it in a plugin, here is a docs for it: [https://developer.mautic.org/#asset-helper](https://developer.mautic.org/#asset-helper)

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 28, 2015, 11:11am UTC](https://forum.mautic.org/t/extending-mautic/2732/29 "2015-11-28T11:11:31Z")

</div>

thank you bro i really appreciate it .

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 10:16am UTC](https://forum.mautic.org/t/extending-mautic/2732/30 "2015-11-30T10:16:47Z")

</div>

bro sry but jquery didnt work with me , i tried what you tell me exactly but no changes at all please check the link  
[https://drive.google.com/open?id=0By1rOlT63sKGNWRXdkJnUjhsWEU](https://drive.google.com/open?id=0By1rOlT63sKGNWRXdkJnUjhsWEU)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 30, 2015, 10:20am UTC](https://forum.mautic.org/t/extending-mautic/2732/31 "2015-11-30T10:20:40Z")

</div>

Howdy, why don’t you send me the whole plugin? This script doesn’t exist in the zip you’ve sent me:

```auto
$view['assets']->includeScript('plugins/MauticMediaBundle/assets/facebookscript.js');
```

The best would be if you could show me the GitHub repo with your plugin and I could clone it.

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 10:36am UTC](https://forum.mautic.org/t/extending-mautic/2732/32 "2015-11-30T10:36:40Z")

</div>

the problem that i tried alot using github but it doesnt works dont know y !!! anyway this is the script file bro  
[https://drive.google.com/open?id=0By1rOlT63sKGY3luNG9JQXJYN2c](https://drive.google.com/open?id=0By1rOlT63sKGY3luNG9JQXJYN2c)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 30, 2015, 10:43am UTC](https://forum.mautic.org/t/extending-mautic/2732/33 "2015-11-30T10:43:02Z")

</div>

Hey bro, you didn’t react to my question again:

> [@](#):
>
> Howdy, why don’t you send me the whole plugin?

The point I was trying to make was that the path didn’t match the script name, but I didn’t know if that’s true because you’ve sent me only 2 files.

I’m sorry, but I quit. I don’t have time to ask the same questions again and again.

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 11:02am UTC](https://forum.mautic.org/t/extending-mautic/2732/34 "2015-11-30T11:02:36Z")

</div>

calm down bro i thought you only need to see the script , this is the plugin  
[https://drive.google.com/open?id=0By1rOlT63sKGMm4zd2k2cTBxVUU](https://drive.google.com/open?id=0By1rOlT63sKGMm4zd2k2cTBxVUU)

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 11:17am UTC](https://forum.mautic.org/t/extending-mautic/2732/35 "2015-11-30T11:17:46Z")

</div>

i will reflex faster next time , please i need your help dude

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 11:44am UTC](https://forum.mautic.org/t/extending-mautic/2732/36 "2015-11-30T11:44:41Z")

</div>

escopecz u r mad at me ?

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [November 30, 2015, 11:53am UTC](https://forum.mautic.org/t/extending-mautic/2732/37 "2015-11-30T11:53:16Z")

</div>

bro please

---

<div class="post-metadata">

**Author:** ![fadelle](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@fadelle](https://forum.mautic.org/u/fadelle)\
**Post date:** [December 1, 2015, 6:17pm UTC](https://forum.mautic.org/t/extending-mautic/2732/38 "2015-12-01T18:17:36Z")

</div>

escopecz ill never waste your time jst want some help, I don’t think wat happened needs all that !!

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:56pm UTC](https://forum.mautic.org/t/extending-mautic/2732/39 "2020-02-02T22:56:49Z")

</div>

Closed on February 2, 2020, 10:56pm UTC



[Previous page](https://forum.mautic.org/t/extending-mautic/2732.md?page=1)
