Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter albertvanharten

    (@albertvanharten)

    Thank you for your reply ??
    I thought about modifying your plugin, and create a new one that way around, but that wouldn’t be fair without your knowledge or accept ??
    However, I found another way to achieve it, by putting a little code in Code Snippets.

    @eleanna83 Thank you so very much for your feedback on your own question: this helped me fixing a problem for one of my customers! Your solution did the trick.

    Albert

    Thread Starter albertvanharten

    (@albertvanharten)

    I tried that, but I don’t get any reply.

    Thread Starter albertvanharten

    (@albertvanharten)

    Hi Mr. Meo
    I added a stop date function to your X-Mas Decoration. If you want the source code, then throw me an e-mail at albert (at) computernoerden (dot) dk.
    I will ONLY send the source file to Mr. Meo – no-one else!

    Albert

    Thread Starter albertvanharten

    (@albertvanharten)

    You’re very fast! Thank you so much!!

    Albert

    Thread Starter albertvanharten

    (@albertvanharten)

    Oh, if you’d like to receive my old PHP code on “the First Sunday Of Advent”, just tell me – I might be able to find it. Not sure if you would need it …

    Albert

    Thread Starter albertvanharten

    (@albertvanharten)

    The “start on First Sunday of Advent”/”After Saint Nicholas” would possibly only be used in Denmark and The Netherlands. I just googled “When should I decorate for Christmas”, and found out that Americans might start decorating in the weekend of Thanksgiving. This year, that seems to fit with the Danish tradition, but that isn’t the fact every year. I am not sure how “we” can cover all the traditions in the world, but if you want, I’d like to find out some other traditions.

    Another feature could be decoration for Easter, or perhaps holidays from other cultures/religions (like Eid or Hannukah), and perhaps own preferences like birthday decorations on specific days/periods.

    Albert

    Thread Starter albertvanharten

    (@albertvanharten)

    Wauw! You’re a genius. Thank you so very much! Now the decoration is being displayed correct.

    A long time ago, before I changed to WordPress, my website was a self-built site in PHP. Then, I created a Christmas decoration function, that automatically turned on the decoration on the First Sunday of Advent – the day of which it is unofficially OK to show Christmas Decoration, in Denmark. The function also disabled the decoration on the 6th of January, which is All Saints Day – the day that accoring to Danish traditions, Christmas Decoration should be removed.
    But I know, that accoring to DUTCH traditions, Christmas Decoration is “allowed” from the day AFTER Saint Nicholas (5th of December) – so each country has it’s own traditions regarding Christmas Decorations.

    Have you thought about a possibility to add a simple schedular to your plugin?
    Either “enter a start and end date”, or a function like “start after Saint Nicholas”, and “Start First Sunday of Advent”, and so forth?

    Albert

    If I enable a Content Security Policy in my .htaccess, the background image does not show up!
    Even if the CSP is completely open:
    Header set Content-Security-Policy “default-src *; script-src *; style-src *; img-src *; connect-src *; font-src *; object-src *; media-src *; frame-src *; sandbox *; report-uri *; child-src *; form-action *; frame-ancestors *; plugin-types *; base-uri *; report-to *; worker-src *; manifest-src *; prefetch-src *; navigate-to *;”

    As soon as I remove the entire line in my .htaccess. the image returns.

    What could be the reason?

    PS I was able to test the thesis by @jeskiv but was not able to reproduce it.
    I had a complete replica of the website running on my test server, from before I altered the database.
    When I activated Yoast on the replica, the website became unresponsive. I deactivated Yoast, and added INDEX privileges to the database user. Then I reactivated Yoast. Again the website became unresponsive. I deactivated Yoast again, and changed the version number in wp-seo.php as @jamesmiddz suggested. Then I updated Yoast SEO, and expected either a note stating the database should be updated or an automatically database update, but neither happened. Thus on reactivation of Yoast SEO, the site became utterly unresponsive.

    I assume, this is an unreported error in Yoast, caused by missing privileges on the database.

    In my world, a running WordPress should only require DELETE, SELECT, INSERT and UPDATE privileges. In cases of maintenance, the user also might need CREATE, but as an ethical hacker, I would recommend only use the first four privileges.
    That means that, IF Yoast SEO require other privileges (which I am not entirely sure about) then Yoast SEO should tell the user when trying to update the plugin.

    Albert van Harten
    Programmer and ethical hacker
    Denmark
    https://computernoerden.dk

    I saw @jeskiv ‘s reaction after I found a solution to the issue in my WordPress/Yoast setup. Probably it would have saved me a bit sooner if I had read it before, LOL. Thanks, @jeskiv

    I was getting Unknown column ‘blog_id’ in ‘field list’ too.
    I simply added a column called blog_id to the table.
    This resulted in other errors, stating the columns created_at and updated_at did not exist. However, the error file did not grow as quick as it did under the first error.
    After I added columns created_atand updated_at, the next error arose:
    schema_page_type did not exist.
    I decided to compare the SQL query with the existing table, and found out that there were two columns, that did not exist: one, that I already knew (schema_page_type) and schema_article_type.
    I added those columns to the table, and voilà, the problem was solved.

    Notes:
    I assume blog_idis an INT, since the value that is added is an integer
    I assume created_at and updated_at are VARCHAR with a length of 19, since the values that are added are timestamps in YYYY-mm-dd hh:II:ss format
    I assume schema_page_typeand schema_article_type are INT, although I cannot proof it. The values that are added are NULL. So the columns should also accept null values.

    My SQL statements are the following

    ALTER TABLE xxxx_yoast_indexable ADD blog_id INT NOT NULL AFTER has_public_posts;
    ALTER TABLE xxxx_yoast_indexable ADD created_at VARCHAR(19) NOT NULL AFTER permalink_hash, ADD updated_at VARCHAR(19) NOT NULL AFTER created_at;
    ALTER TABLE xxxx_yoast_indexable ADD schema_page_type INT NULL AFTER blog_id, ADD schema_article_type INT NULL AFTER schema_page_type;

    But be sure to replace xxxx with the database prefix chosen at WordPress installation (if you don’t remember: check your database or your wp-config.php).

    Albert van Harten
    Programmer and ethical hacker
    Denmark
    https://computernoerden.dk

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