feed – Debugging problems with WordPress RSS widget?

I’m trying to add an RSS feed to a wordpress site using the RSS widget. When I enter the URL into the RSS widget I get RSS Error: WP HTTP Error: A valid URL was not provided. (or sometimes I get nothing — no error, but no content).

The feed validates successfully using the W3C feed validator.

If I expose the feed on a different site (e.g., grab the feed content with curl, serve it somewhere using a simple http server, and point the rss widget at it), it works just fine.

This leaves me to wonder if the RSS widget is experiencing some failure unrelated to the feed itself…stale DNS? Something else?…but I’m not sure how to diagnose that. This is a hosted wordpress site so the only access I have is via the WP UI. Is there anything I can do to figure out why exactly the RSS widget is failing?


To be clear, this works just fine:

  • curl -o feed.xml https://.../feed.xml
  • darkhttpd . --port 8080
  • ngrok http 8080

…and then point the RSS widget at the ngrok url.

So the same content, fetched from the canonical location, just hosted at a different URL.

[cXF] Widget Homepage | NulledTeam UnderGround

Description:
Easily create a widget homepage like a portal page. Add any widget to any widget homepage position. Use your imagination and create a homepage to suit your needs.

The custom header is ideal for the landing page. Add a background image, optional widget only for guests or for all users.

Features:

  • adds a dedicated page for your homepage (or some other page)
  • many widget positions (see also map below):
    • sidenav (left side)
    • sidebar (right…

.(tagsToTranslate)xenforo nulled(t)nulled(t)whmcs nulled(t)vbulletin nulled(t)whmcs themes nulled(t)whmcs modules nulled(t)whmcs template nulled(t)nulled forum(t)best nulled scripts site(t)whmcs templates nulled(t)phpfox nulled(t)nulled script(t)xenforo 2 nulled(t)best nulled sites(t)xenforo nulled themes(t)whmcs nulled(t)nulled scripts(t)vbulletin 5 nulled(t)whmcs addons nulled(t)arrowchat nulled(t)cs-cart nulled(t)xfilesharing pro nulled(t)nulled script forum(t)cs cart nulled(t)nulled sites(t)blesta nulled

Converting a WordPress widget to a block

Is it possible to convert an existing WordPress widget to a block, without having to write a custom block (javascript)?

Conditional widget for a listing archive page

I am building a listing website (using ListingPro theme)

Inside the Listing Archive page I added some advertising widgets and I need to add conditions to it so that different content is displayed according to the location.

For example, the user chooses location A, the widget displays ads for A. The user chooses location B, displays for B, and so on.

I tried using the Widget options plugin but I don’t know how to set the logic condition here: Widget options

Using the conditional tags from here: https://codex.wordpress.org/Conditional_Tags

This is the website I’m working on: www.guiamercados.com

It has a search engine where you can choose a category and a location and then it shows a list of listings.

For example, if I search for the city of “Buenos Aires” it shows me the following link: https://guiamercados.com/?select=&lp_s_loc=1203&lp_s_tag=&lp_s_cat=&s=home&post_type=listing

As you can see from the link Buenos Aires has the ID 1203. How could I set the logic condition inside the widget so that it shows according to the ID of the location you are looking for?

Any ideas? Thanks in advance!

How to show Wishlist products on header using DropdownDialog widget

I want to display my wishlist products on the header using the DropdownDialog widget, it’s like add-to-cart, how to achieve this.

8 – Alter field widget settings fields

The form_id we want to alter is entity_form_display_edit_form
Because the settings fields are loaded through ajax, we first have to check if we are currently editing a field settings by checking $form_state->get('plugin_settings_edit')
The fields we are looking for are then located at $form('fields')(FIELD_NAME)('plugin')('settings_edit_form')

function fintech_form_entity_form_display_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $field_name = $form_state->get('plugin_settings_edit');
  if(!empty($field_name) && isset($form('fields')($field_name)('plugin')('settings_edit_form'))) {
    $form('fields')($field_name)('plugin')('settings_edit_form')('third_party_settings')('whatever_you_want_to_alter') = '';
  }
}

magento2.3 – Sort product list widget by position?

I added a prodct list widget that should show products from one category, sort by position.

Sort products in widgets seems not to work, so I tried a suggested module from this question. It adds a plugin for afterCreateCollection() and (nearly) works.

It adds

ORDER BY `cat_index_position` ASC

but the query still isn’t correct.

SELECT DISTINCT  `e`.*, `cat_index`.`position` AS `cat_index_position`, 
`price_index`.`price`, `price_index`.`tax_class_id`, 
`price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, 
LEAST(price_index.min_price, price_index.tier_price), 
price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, 
`price_index`.`max_price`, `price_index`.`tier_price` FROM 
`catalog_product_entity` AS `e`

 INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON 
cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND 
cat_index.visibility IN(2, 4) AND cat_index.category_id=1146

 INNER JOIN `catalog_product_index_price_store` AS `price_index` ON 
price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0
 AND price_index.website_id = '1' WHERE (price_index.store_id = 1) AND 
(price_index.store_id = 1) AND (price_index.store_id = 1) AND 
(((IFNULL(`e`.`entity_id`, 0) IN (SELECT 
`catalog_category_product`.`product_id` FROM `catalog_category_product` 
WHERE (category_id IN ('1397')))) )) ORDER BY `cat_index_position` ASC

This part is correct, 1397 is my select category.

WHERE (category_id IN ('1397')))) )) ORDER BY `cat_index_position` ASC

This one is wrong. 1146 is the root category. It is not set as “anchor”, contains no product, but has entries in catalog_category_product_index_store1. The position is set for some reason, with different values as for category 1397.

AND cat_index.category_id=1146

Any ideas how to fix this?

Magento 2.3.6

magento2 – How to access widget configuration options in Block class?

Although there’s a similar question asked, it doesn’t have an answer as the comment there refers to a question which has a comment that shows how to access the admin panel configuration parameters in the template file which works fine for me (i.e. $this->getData('config_param_name');).

The issue is that the $data array injected in the Block class constructor is empty when inserting it via Magento admin -> Content -> Widgets -> Add widget -> Layout update while it has the Widget configuration options (widget options in admin panel) when the widget is inserted via Content -> Page -> (select page) -> Insert widget as tested via xdebug.

I need to check against the configuration options in the Block class and do conditional logic, so accessing the parameters from template file is too late in the call stack.

<?php

declare(strict_types = 1);

namespace CompanySomeWidgetBlockWidget;

use MagentoFrameworkViewElementTemplate;
use MagentoCmsApiPageRepositoryInterface;
use MagentoFrameworkApiSearchCriteriaBuilder;
use MagentoWidgetBlockBlockInterface;

class SomeWidgetBlock extends Template implements BlockInterface
{
    /** @var string  */
    protected $_template = 'Company_SomeWidget::template.phtml';

    protected $_param1;

    protected $_param2;

    /** @var PageRepositoryInterface */
    protected PageRepositoryInterface $_pageRepository;

    /** @var SearchCriteriaBuilder */
    protected SearchCriteriaBuilder $_searchBuilder;

    public function __construct(
        MagentoFrameworkViewElementTemplateContext $context,
        PageRepositoryInterface $pageRepositoryInterface,
        SearchCriteriaBuilder $searchCriteriaBuilder,
        array $data = () // <-- This is empty when widget is inserted via layout update
    ) {
        parent::__construct($context, $data);

        $this->_pageRepository = $pageRepositoryInterface;
        $this->_searchBuilder = $searchCriteriaBuilder;
        $this->_param1 = $this->_getData('param_1');
        $this->_param2 = $this->_getData('param_2');
    }
}

usability – Horizontal scrolling widget for mobile webpage?

There are horizontal scrolling UI elements used in mobile apps and websites, which were popularly implemented as ‘carousels’ (although many would caution against using them because of usability issues that often crop up), but since then has also been used in other parts of the user interface.

I don’t think you can give it a specific name because it is partly a design pattern and partly a type of interaction, so the name of the UI element or component will vary depending on how it is implemented. Hence it is still referred to mostly as horizontal scrolling, at least where I have seen it mentioned.

There is an article in UX Planet that talks about the usage of horizontal scrolling in mobile that goes into detail about some of the design patterns.

Some of the key points raised in the articles include:

  • Careful planning because there are a lot of things to consider and because it is not what most designers or visitors or used to, you have to plan a lot more than you might with a vertical site
  • Horizontal scroll works best when you want to display a subset of a category
  • For mobiles you have to do it differently. Your design must have a visual hint that a set of content is horizontally scrollable. The best way to do it is, letting a part of the scrollable content peek out
  • If it’s used wisely it saves a lot of vertical space and helps in compartmentalising the content on an app

Manage media per user without using the Media Manager widget

In Drupal 9, I have users loading audios into their profile.

When logged in, users should only see their private audio media in the media manager.

This works well with a contextual filter, as long as you are in the media manager. But on the user edit page it doesn’t work well, because the media manager widget wont work with the same contextual filter, as the global media manager view.

On the User edit page the ideal version would be a regular upload field (as one would have for a file), which loads the audio into the media library as a media entity. And a simple list of the audios already uploaded. A simple way to manage only ‘my’ files on ‘my’ user edit page without using the media manager widget.