Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Stephen Dickinson

    (@steved430)

    Hi Dion,

    Many thanks. That worked perfectly. The documentation I have read on the implementation of namespaces within PHP doesn’t mention this. Simply states Global space will be searched after current namespace.
    And I will admit, when I read that I thought that was poor. It means you have to error before you find the correct function – which is wasteful, plus it doesn’t indicate in the source code what is actually meant. So agree to your comment about adding the ‘\’ before functions as well.

    Thanks

    Steve

    Thread Starter Stephen Dickinson

    (@steved430)

    Resolved

    Thread Starter Stephen Dickinson

    (@steved430)

    Hi,

    Thanks for the response, and apologies that it has taken me a couple of days to get back, but I wanted to follow through with your suggestion.

    First, thanks that for your suggestion. What it demonstrasted was that I had the wrong end of the stick. That callbacks were being employed made me believe that the various queries on a page couold be being called asynchronously. From your sugested solution that is obvioulsy not the case, and the php code is just executed synchrounously.

    As a quick proof of Concept I used a Global variable to hold the name of the Catalogue I wanted to filter by. As that worked, I switched to a singleton class with a catalogue filter attribute that I can get and set.

    Thanks again for your help and insight

    I recently upgraded to WP 5.2.3, plus upgraded a number of plugins. Following the upgrade I noticed that the formatting on a number of Posts and Pages was wrong. All the paragraphs on these pages had lost their styling. The reason: the <p> tags had been stripped somewhere between page/post extraction and publication.

    The <p> tags are there in the original text. If I edit the pages/posts and switch to HTML, then they are clearly visible. The problem does not impact every page, but appears to be restricted to those where I had switched from Gutenberg Editor back to Classic Editor.

    For myself I did stumble across a solution:
    Switched back to Gutenberg Editor
    I edited the page.
    Switched to HTML text
    Copied the complete text.
    Deleted the text AND its containing block – so that I was back with an empty page in Gutenberg.
    Pasted in the text.

    So, that’s a solution that has worked for me.

    Note: I do not believe this problem is related to the wp_autop function, which, as I understand it, is designed to interpret two consecutivde blank lines to mean ‘Start a new Paragraph’. This problem is the removal of all <p> tags and the consequent loss of styling associated with the <p> element. I am not sure what the reasoning is behind the <p> tag removal, and the FAQ page referenced above does not actually explain the reasoning, but I would respectfully suggest that any code that decides it knows what HTML restructuring to perform is entering an area it should not.

    Hi,

    There does appear to be occasions when the Gutenburg Editor fails to display the page. I am running WordPress 5.2.2, and whilst I can successfully edit most of my pages and posts, I do have a small number of pages/posts that display as a blank screen when attempting to Edit. I have tried disabling all plugins and switching to theme Twenty Nineteen to no effect. The solution for me was to install ‘Classic Editor’ plug-in and switch to the classic Editor.

    Thread Starter Stephen Dickinson

    (@steved430)

    Thanks to everyone for getting back. Issue is now solved. It all revolved around namespaces and fully qualified names.

    Thanks

    Thread Starter Stephen Dickinson

    (@steved430)

    Hi Joy,
    Thanks for getting back. Like you, the issue I have is that the doc says it is enabled by default, which implies I would get a different error than “Class not known” if there were an encoding issue. The error I am getting implies that the library containing the class has not been loaded, and yet as far as I can tell the xml/doc parsing libraries should be available by default with PHP 7. They are there with my VS 2017 env, but not, apparently, with the WAMP installation.

    Further to my initial comments, I have edited the php.ini file to enable all the php extensions, sadly to no effect.

    I did encounter something similar after a switched into HTML edit mode to change a link. The HTML was fine (I didn’t change the tags, only the html address and the display text), but after that I was unable to create any more blocks. The only solution I found was to delete the block containing the edited link, and re-enter, taking care to get the link and display text correct.

Viewing 8 replies - 1 through 8 (of 8 total)