Focus Item & Landing Page Bug

Your software
My Mautic version is: 3.1 & 2.16.3
My PHP version is: 7.2

Your problem
My problem is:
Trying to add focus items to a Mautic landing page

I can only add {focus=1} in a landing page, any other form does not show.

image

For fucus item =1 everything works fine. Now if I go and change the 1 to a 3, first it does not show up in the dropdown, so now my code looks like {focus=3}.

I go and test the page and it does not work.

These errors are showing in the log:

This is the error that I see in the console:
Failed to load resource: the server responded with a status of 404 (Not Found) https://mydomain.com/focus/3.js

In the System Logs I am seeing this:
[2020-10-05 08:40:25] mautic.NOTICE: PHP Notice - Undefined index: safari_web_id - in file /var/www/mydomain/app/bundles/NotificationBundle/Helper/NotificationHelper.php - at line 117 {“integration”:"[object] (Mautic\NotificationBundle\Integration\OneSignalIntegration: {})",“settings”:"[object] (Mautic\PluginBundle\Entity\Integration: Mautic\PluginBundle\Entity\Integration with ID #1)",“keys”:,“supported”:[“mobile”,“landing_page_enabled”,“welcome_notification_enabled”,“tracking_page_enabled”],“featureSettings”:{“subdomain_name”:null,“platforms”:},“appId”:null}

Steps I have tried to fix the problem:

I have tried adding the code to the bottom of the page without using the personalised focus item token.

Focus item turned on, right?

Yip :slight_smile: it is. Double checked everything.

Any one have a clue about this or is seeing different behaviour ?

Can you clone the page you are working on and then remove the [form=10} to eliminate it from the equation and save with just {focus=3} ?

Can you verify the mautic tracking script in on the published landing page? I believe its required in addition to the code for the focus item.

are you using Onesignal? Can you disable the plugin for testing purposes?

@mikew I made a quick landing page and focus item to recreate the issue. This is what I got.

When I was not logged in the page 500 errored me
When I was logged in the errors occurred

The link explains this type of error but not much else.


Its not just you

@EJL. Amazing !!! Thanks for testing. Lets see if there is an explanation to why this is happening. maybe someone else will shed some light.

I added more detail to my response. The error has to do with incorrect headers and MIME types. I dunno if Mautic is generating them incorrectly in the landing page builder output, if something crazy is in the .htaccess generated by mautic when you install is doing odd re-writes or what. It will take some time to chase down.

I running Mautic 3.1.1 Btw