Hidden-Settings get ignored on non native joomla/sp pages - Forum | JoomShaper
Solved SP Page Builder

Hidden-Settings get ignored on non native joomla/sp pages

Asked by BITS 2 years ago Last activity 2 years ago

If you use settings for hiding on xl/lg/md/... they will be dropped if you are for example on a virtuemart products page.
If you are on a virtuemart-category page the settings work.

The problem is in the addon\start.php

You're checking here for view-modes (page, article, item, category, featured, products) and only if the current page is one of this view-modes, then the hidden-settings will be added to the addon.

Since the virtuemart-category page uses "category" as view-mode, it's working there.
But the virtuemart-products page uses "productdetails" as view-mode and so the hidden-settings will be ignored.
The same goes for the cart page, the settings will be ignored.

I don't know why you've added this check but it breaks the whole hiding on all non native joomla/sp page builder pages which cannot be the way you want to go if you allow to use SP Page Builder in modules...

Please fix this, otherwise I have to remove this check on each update.

Accepted answer

Marked as the solution
Toufiq Senior Staff

Yes, We will add this function next update. Thanks

9 more replies

Toufiq Senior Staff

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Can you share a screencast video about the full scenario? And provide me administrator access via hidden content area to check the issue.

Best regards,

Toufiqur Rahman (Team Lead, Support)

BITS Asked this

Hi,

I can give you a step by step instruction, it's nothing special about my installation:

  1. Install Joomla (v5.2.0) + SP Page Builder(v5.4.1) + Virtuemart (v4.2.18 including Demo Samples)
  2. Create a SP Page Module
  3. Add a row with a single column
  4. Add two icon addons to this column
  5. The first addon is only visible for desktop
  6. The second addon is only visible for mobile
  7. Set the module to the position breadcrumbs and always visible
  8. Go to a virtuemart category page --> only the first icon is visible (on desktop)
  9. Go to a virtuemart product page --> both icons are visible
  10. On the product page all "sppb-hidden-xxxxx" classes are missing on the icon-addon-html-node

Greetings

Toufiq Senior Staff

Please prepare the issue on this URL.

BITS Asked this

Done.

On the "Shop" or "Pages" page only the desktop icon is visible.
On the "Single Product" or "Cart" page all icons are visible.

So even with your easystore the issue exists on some pages (what is no wonder if you check for the allowed view-modes as descriped in the opening post).

Toufiq Senior Staff

Got it your issue. I just shared your issue to our developer team. When it resolved, i will let you know. Stay with us. Thanks

Toufiq Senior Staff

Follow this instructions.

/components/com_sppagebuilder/layouts/addon/start.php

Find out this code

$allowed_responsive_view_modes = ['page', 'article', 'item', 'category', 'featured', 'products'];

And replace with this code.

$allowed_responsive_view_modes = ['page', 'article', 'item', 'category', 'featured', 'products', 'profile', 'product', 'cart', 'login'];
BITS Asked this

Thanks but I do not have to test this - I already know that this is only a bandage for this issue.
For example the productdetails view of virtuemart would not work even then.

You have to find a completely different solution for this problem or remove this check completly.

Here a list of examples of the native (!) joomla components where this would not work too:

  • Contacts -> contact
  • Contacts -> categories
  • Newsfeed -> newsfeed
  • Privacy -> request
  • Privacy -> confirm
  • Smartsearch -> search
  • Tags -> tag
  • Tags -> tags
  • Users -> remind
  • Users -> reset
  • Wrapper -> wrapper

As you can see you never will be able to catch all possible view-modes, not even mention the third-party-extensions.

You have to know why you added this check in the first place and find another solution for your problem which you tried to solve with this check.

Toufiq Senior Staff

Updated code here and which is missing you can add inside the array.

$allowed_responsive_view_modes = ['page', 'article', 'item', 'category', 'featured', 'products', 'profile', 'product', 'cart', 'login', 'tag', 'contact', 'categories', 'newsfeed', 'request', 'confirm', 'search','tags', 'remind', 'reset', 'wrapper'];
BITS Asked this

Yes I know but that's not the solution I have asked for in the first place.
Then I'll have to modify this file on each update - so nothing has changed.

Every joomla extension which does not exactly use this views or even if joomla itself adds new views would break your logic.

Toufiq Senior Staff

Download & replace this file on this file location.

/components/com_sppagebuilder/layouts/addon/start.php

start.php.zip

BITS Asked this

Now that's the solution I wanted to see!
It's working how it should, if you add this now to the future updates we can close this ticket.

Log in to reply.