Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)
  • Bence Szalai

    (@grapestain)

    Azért egy CVSS 7.2 sebezhetőséget lassan egy éve szóra sem méltatni az elég durva…

    It is clearly one of those decisions that ignores what the users want.

    Which is okay, you can do that, it is free software, we have no rights to complain.

    But be bold enough to admit that your product has pivoted and existing users concerns are ignored as a deliberate decision. There is no need to be wishy-washy with “At the moment, there isn’t an option or hook available to fully disable the builder.”. Whoever made this decision to turn a plugin that had purpose A to a completely different plugin serving purpose B must have made this decision knowing that it’ll put existing users into a situation they did not choose to end up in.

    Again, it is fine, you can do that. But don’t pretend it is a fair thing to do.

    I can tell you what it looks like: You had this plugin, installed on large number of sites, because it was a go to Customizer extension for developers for many years. It was obvioulsy not installed by end-users, it was used by devs. So looking at the large install base you just decided to effectively hijack all those sites and try to push you new and completely unrelated product onto those websites, hoping the end users would pick it up.

    Again, you can do that, but don’t create this deeply unjust discussion suggesting the builder cannot be disabled “At the moment”. We all know what is going on.

    You may be polite with your words, but is it really polite to think we are all blind / dumb to not see what you did? I don’t think so…

    You can do whatever you want with your software, but you cannot at the same time expect us to pretend we don’t see what you did and to not speak up when you make a fool out of us all…

    • This reply was modified 1 month, 1 week ago by Bence Szalai.
    • This reply was modified 1 month, 1 week ago by Bence Szalai.
    Thread Starter Bence Szalai

    (@grapestain)

    I see. I find the decision strange, but thanks for the explanation indeed!

    Thread Starter Bence Szalai

    (@grapestain)

    Well, the issue I had I managed to resolve: the analyzer cache has hold onto deleted pages and it tried to get API response for non existing page which caused the API to return an error.

    My main point is that the exact error I was not able to see on the UI, because the code I mentioned tried to access a private property and failed so it only displayed a generic error.

    Please check the code I mentioned, you will see the issue.

    Thread Starter Bence Szalai

    (@grapestain)

    Never mind, it was something else causing the issue.

    Thread Starter Bence Szalai

    (@grapestain)

    Yep, all is good now, thanks!

    I noticed the duplicated database had a file size of around 17 mb, while the 10.5 version was a 27 mb. Do you know if this is because compression/better handling in the MariaDB 11.4? I duplicated it with the exact same spec, only thing changed was the version 10.5 > 11.4.

    Databases tend to keep allocated space when stuff is deleted, so a fresh import will always be the required minimum size for the data stored, while a “live” database will always will be slightly larger due to changes done to the data. Most db engines support an Optimize command for tables with which they free up the unused space, but it is useless to do that unless the wasted space would grow too big. Usually the db engine will do it automatically anyway once the overhead grows beyond a limit.

    I’m glad to find this information!

    May I suggest you add few words about it here: https://woo-docs.payaddons.com/ ?

    Also the placeholder text on the configuration UI for the secret key suggests sk_live_xxxxx. Probably it’d be better to suggest rk_live_xxxxx and link the list of required permissions there.

    Gutenberg editor can run at the moment in two modes: Iframed and non-iframed. Iframed mode is the preferred one by the system as it offers many benefits for the styling consistency etc. But Iframed mode can only work with newer blocks. So as long as you install any plugins that contain Gutenberg blocks with the API version v2, the editor will switch to non-iframe mode. (https://make.ww.wp.xz.cn/core/2023/07/18/miscellaneous-editor-changes-in-wordpress-6-3/#post-editor-iframed)

    As you can guess the Meta box behaviour depends on this. The old “scroll mode” is the non-iframed, and the “resize handle” mode is the new iframe mode.

    If your editor runs in iframed mode the good news is that you don’t have any v2 block plugins installed, so your system is up to date. The downside is you now have a handle for the meta boxes.

    It can be restored to a scroll mode using css:

    .edit-post-meta-boxes-main.is-resizable {
    height: unset !important;
    max-height: unset !important;
    }
    .edit-post-meta-boxes-main.is-resizable .edit-post-meta-boxes-main__presenter {
    pointer-events: none;
    }
    .interface-navigable-region:has(.edit-post-meta-boxes-main.is-resizable) {
    display: block;
    }
    .block-editor-iframe__scale-container iframe {
    padding: 40px;
    min-height: 85vh;
    }

    The problem here is that pure CSS cannot make an iframe grow its height to match the contents. That can only be done using scripts. But this workaround adds a bit of a padding around the content editor which helps the user understand how the two scroll-bars should be handled.

    With this the editor always fits the screen height (if not, tweak the min-height: 85vh; part) and still allows the meta boxes to be scrolled into the screen easily.

    To me it is still better than dragging the small handle every-time I need to look at either the editor or the meta boxes. That is painfully cumbersome.

    Yes, that is the one.

    To be honest it is quite strange that you cannot reproduce the warning, it is a core warning emitted here: https://github.com/WordPress/WordPress/blob/master/wp-includes/l10n.php#L1369

    The warning itself is a bit strange too because the warning is only emitted if the call happens before after_setup_theme but the message says there should be no such calls before init. (after_setup_theme happens before init). Maybe they will later tighten the criteria to init but they already put the message so if someone makes adjustments they will not have to do that again. Only speculation.

    To be honest I don’t know if my workaround is really working well, I’m only using the plugin to collect and report stats but not the frontend UI parts, so it may break some things. I just wanted a quick dirty fix.

    I think a proper fix would be instead of moving the whole plugin initialization as that really risks breaking other things just simply move the Widget initialization to the init hook. It still requires some refactorings as your Container class does a fairly linear initialization, but afaics the only reason Widget is initialized early because it is passed to WordPressPopularPosts, and the only reason it is passed is to be able to handle the loading of all services with a single $WordPressPopularPosts->init() call in Bootstrap.php.

    If you remove [this](https://plugins.trac.ww.wp.xz.cn/browser/wordpress-popular-posts/tags/7.1.0/src/Container/WordPressPopularPostsConfiguration.php#L56-L65) whole call from WordPressPopularPostsConfiguration.php and as a dependency of WordPressPopularPosts and instead you can add this to Bootstrap.php i think that would work and leave everything else the same as now except for the Widget:

    add_action('init', function() use ($container) {
    $container['widget'] = $container->service(function(Container $container) {
    return new Widget(
    $container['widget_options'],
    $container['admin_options'],
    $container['output'],
    $container['image'],
    $container['translate'],
    $container['themer']
    );
    });
    $container['widget']->hooks();
    });

    (I only used the closure for simplicity, if you want to support older PHP version probably you want to use a proper named callback.)

    Sidenote: since $container['widget'] is not used anywhere else it is not necessary to add it to the container at all.

    @hcabrera Probably there’s not much to wait for. WordPress was addressing some other issues and as part of that they changed how the translations are loaded. So what worked before (using __() functions very early triggering an implicit call to _load_textdomain_just_in_time()) is no longer supported. It is not going to resolve itself. Other plugin authors are already updating their plugins to fix these warnings, changelogs for 4 out of 10 updates in the last month had fixes related to this. You need to move the plugin initialization to the init hook or reorganize the code to eliminate/delay the early call to __( in Widget.php line 79.

    I’ve monkey patched Bootstrap.php for now to only make the container and call $WordPressPopularPosts->init(); on the init hook (with prio 0 so functions hooked to init in the plugin with default prio 10 can still fire), but an official fix would be nicer!

    • This reply was modified 1 year, 6 months ago by Bence Szalai.
    • This reply was modified 1 year, 6 months ago by Bence Szalai.
    • This reply was modified 1 year, 6 months ago by Bence Szalai.
    • This reply was modified 1 year, 6 months ago by Bence Szalai.
    Thread Starter Bence Szalai

    (@grapestain)

    Ahh, sorry for the confusion. Thanks!

    Thread Starter Bence Szalai

    (@grapestain)

    Yeah, I just gave up and removed it. Still very very bad approach and precedent. They made a plugin that breaks proper sites, just to make it work better with some broken sites. If a theme does not implement wp_head and wp_footer that is a broken theme. This plugin should be put on a blacklist or at least be marked as potentially dangerous for not adhering to WordPress design principles. But I have other fights to fight…

    I am having a very similar issue, except for me the Content Display block was missing, others were fine.
    Turns out that the var advgb_blocks_vars = { line that should contain a JSON under the original_settings.styles array had an object, who’s css property was not a css, but an HTML. Being so escaping somehow failed, so eventually this variable as well as subsequent variables, including advgbBlocks were never set on the editor screens.

    Indeed the CSS ended up being an HTML because a CSS file was not where it was supposed to be, which ended up resulting in the WordPress 404 HTML. I’ve added < !-- < ?= $ _SERVER['REQUEST_URI'] ?> --> to the top of the head of my theme to find out the missing CSS file.

    Eliminating the wrong CSS enqueuing fixed the issue.

    On one hand I’ve written it in hope that it may help others facing similar issues.

    But on the other hand I’m wondering how it is possible? AdvancedGutenbergMain::$original_block_editor_setting is added to the page using the standard wp_localize_script. How come escaping breaks when one of the array members end up being an HTML instead of CSS? It is supposed to go through json_encode so it shouldn’t matter. Still, the JSON is broken…

    So looking into it more, turns out WordPress is quite naive when encoding json in the localize script call calling wp_json_encode without any options, which in turn calls PHP json_encode without options. Adding JSON_HEX_TAG to the call fixes the broken JSON and thus the missing PublishPress blocks issue as well.

    UPDATE: So it turns out the issue is caused by another plugin which injects CSS files using non standard method, that is it buffers all HTML output, then searches for </head> and adds it’s style links before that tag. Since the inline JS object created by wp_localize_script contains the token </head> due to a whole 404 HTML is included instead of a CSS, now this script finds that tag, and injects it’s <style... tag before. However indeed this tag contains a " which closes the JSON string and breaks the object structure. The only reason adding JSON_HEX_TAG “fixed” the issue, is that </head> became \u003C/head\u003E which was now immune to that non standard behaviour.

    This being said, my issue might have been a different one than OPs, but in may be related. My takeaway: If PublishPress blocks are missing, check the console for Uncaught SyntaxError: missing } and Uncaught ReferenceError: advgbBlocks is not defined errors, as it may point into the direction of solution.

    • This reply was modified 2 years, 2 months ago by Bence Szalai.
    Thread Starter Bence Szalai

    (@grapestain)

    Actually I’ve monkey-patched the videopress.js file to expose videojs and fire an Event once it is loaded, so I could call videojs.addLanguage(). Happily loading languages from here work like charm: https://github.com/videojs/video.js/tree/main/lang

    So please expose an API to allow either directly interacting with the included video.js or a way to load translations from the theme author/site admin perspective.

    Honestly, if VideoPress simply automatically loaded the translations of the languages installed on the given WordPress, that would be the best, as than it’d be not a site admin responsibility to keep the translations up to date.
    Bu than the “Loading…” message would still be a problem as that’s not a string in Video.js, but in VideoPress… Still, 99% of the UI would be fine without any need for manual translations, as the translations are there, ready to be used.

Viewing 15 replies - 1 through 15 (of 24 total)