Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter RayR75

    (@rayr75)

    Alright, I managed to “fix the solution”. I tried to repair the database but it could not find any issues. And still, what-ever I tried, I could not check the ‘auto-increment’ box to activate this in my MySQL table.

    Because AI was the issue, I went back to an older database where AI was still ‘activated’ in the table. This “fixed all the issues”.

    What-ever caused this, no idea. I guess it was one of the optimise plugins.

    All in all, I am good and, once again, I would like to thank you for your time. I really appreciate this!

    Take good care and stay safe ??

    Ps. if I find a 100% answer to what caused this, I will still post it here.

    Thread Starter RayR75

    (@rayr75)

    Ok, I found the issue, it is:

    “AUTO_INCREMENT” in the database.

    I am trying to find ways to fix this now. I noticed already that doing this through PHPMyAdmin does not really work.

    Any tips welcome ??

    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Thank you very much for your time again.

    I did update these settings in the past, in the php.ini file. I just double-checked this and it seems to be working as intended still. I even went back to the original settings and it still gave me the error when uploading an image:

    “An error occurred in the upload. Please try again later.”

    Btw, I just noticed that I also can not add a page anymore.

    I am starting to get the feeling it has something to do with swapping PHP versions between the 2 computers.

    Ok, time to do more research.

    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Hi and thanks again,

    I only work locally now on 1 computer, my iMac. There is enough disk-space and the media upload sizes are also be fine (I increased the upload sizes for the media). The biggest file I uploaded was a video of 12MB.

    I work with MAMP.

    The most remarkable is that I also can not add a new link to the navigation menu’s. Although adjusting my content is not an issue.

    I have the feeling something is wrong, or broken, within the database somewhere. I will defo continue searching and will write it down here if I come across an answer or solution.

    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Hi, and thank you for your reply. I switched from a macBook Air to an iMac.

    Today, I optimised my database with the WP-Optimise plugin (about 1MB in size now). I could download them and upload them again between the 2 computers, without any issues.

    However, when I want to upload an image, I get an error message “An error occurred in the upload. Please try again later.” and my media library breaks (not showing the thumbnails anymore). To show my thumbnails again, I need to reupload my database.

    Then still, I can not add a new link to my navigation menu’s. It shows the adding animation but does not add the link.

    I do not know what causes this, or in what direction to look, debug or fix this.

    The issue occurs on both computers now.

    I used the following code in WP-config to get a logbook:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);

    But no logbooks are created, meaning “no issues”!?

    • This reply was modified 2 years, 10 months ago by RayR75.
    • This reply was modified 2 years, 10 months ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Thank you ‘bcworkz’, I forgot about an overwriting issue. This was indeed the case. There was some other code in the functions.php that caused my website to crash.

    It is solved now.

    Thanks for spending that time for me. Very much appreciated!

    Take care,

    Ray

    Thread Starter RayR75

    (@rayr75)

    Hey James,

    When I click it, it does not give me the option to select a page. I guess it might be because it’s not “supported” with the Theme, since it’s my own.

    What I have now, is my landing page set up like so:

    <!-- Page Section 1 -->
    <?php $recent = new WP_Query("page_id=1"); while($recent->have_posts()) : $recent->the_post();?>
      <section id="<?php echo $post->post_name; ?>" <?php post_class($post->post_name); ?>>
        <div class="container">
            <?php the_content();?>
        </div>
      </section>
    <?php endwhile; ?>
    
    <!-- Page Section 2 -->
    <?php $recent = new WP_Query("page_id=2"); while($recent->have_posts()) : $recent->the_post();?>
      <section id="<?php echo $post->post_name; ?>" <?php post_class($post->post_name); ?>>
        <div class="container">
            <?php the_content();?>
        </div>
      </section>
    <?php endwhile; ?>

    ETC ETC ETC

    It works, it just that when I throw this live, Google see these sections as separate pages and when people click on Google’s links, they do not end up on the landing page, but the individual page. For this I have to manipulate it through HTACCESS and robots.txt

    I hope, and assume, that when I would use that dropdown page selector, this issue might not occur. Assuming WordPress has a standard process for this which is normally in their template.I guess, not sure.

    Hope you get what I mean. It’s tough to explain, especially when English is not my first language ??

    • This reply was modified 3 years ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Thank you guys, I will definitely check it out. For the time-being, I have found a solution with JQuery by swapping the tags and wrapping them.

    Thread Starter RayR75

    (@rayr75)

    It seems that the trick, if correct, is to make sure to use:

    RedirectMatch /page/ /#page
    not
    RedirectMatch /page /#page

    Hopefully this is right.

    Thread Starter RayR75

    (@rayr75)

    Well, it almost drove me insane but with your help, I got it now. So, thanks again! ??

    Thread Starter RayR75

    (@rayr75)

    I got it!

    First, I updated WordPress on my staging site. This had no success. Then, I ended up re-uploading all my files again. No luck either. Then, I re-uploaded the database from the live site and stuck it in my staging site. That worked!?

    So, why still not on the live site?
    Well, it’s in the anchors!

    All my anchors are like this: https://www.website.com/#target. But on my clients domain I noticed that ‘www’ is missing in the URL. https://website.com/#target.

    The links will still work even though there is ‘www’ in the anchors. How ever, WordPress does not recognize this somehow and therefore will not give it the “current-menu-parent” and “current-menu-ancestor” class. It will only give these classes if the anchors are exactly the same as the url, so without ‘www’.

    Changing my menus anchors, fixed the problem.

    Amen! ??

    • This reply was modified 4 years, 1 month ago by RayR75.
    • This reply was modified 4 years, 1 month ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Thank you again for spending your time on me. You brought me to the right path ?? To clarify, I am creating my own Theme/template. I was not explaining myself clearly enough, I think.

    So, I found an older error log(below). Apparently this also affects ‘WP_Nav_Walker’.

    I did some research and there is really not much info about this. There was only 1 website(https://php-download.com/package/johnpbloch/wordpress-core/file/wp-includes/functions.wp-scripts.php) that gave me the code that actually worked. But for this I had to replace the “functions.wp-scripts” file. Not something I am too happy about, to be honest.

    If you would know a different solution, I would love to hear it. For now, I will leave this code in there and search for some more answers.

    Thanks again and take care.

    PHP Fatal error:  Uncaught Error: Class 'WP_Scripts' not found in /wp-includes/functions.wp-scripts.php:23
    Stack trace:
    #0 /wp-includes/functions.wp-scripts.php(128): wp_scripts()
    #1 /wp-includes/widgets/class-wp-widget-text.php(58): wp_add_inline_script('text-widgets', 'wp.textWidgets....')
    #2 /wp-includes/class-wp-widget.php(252): WP_Widget_Text->_register_one(1)
    #3 /wp-includes/class-wp-widget-factory.php(102): WP_Widget->_register()
    #4 /wp-includes/class-wp-hook.php(287): WP_Widget_Factory->_register_widgets('')
    #5 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #6 /wp-includes/plugin.php(478): WP_ in /wp-includes/functions.wp-scripts.php on line 23
    • This reply was modified 4 years, 1 month ago by RayR75.
    • This reply was modified 4 years, 1 month ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Thanks! I have checked the WP version and PHP version. They are both identical.

    Then, I checked the local version for php errors, using the below code in the htaccess file, including the .txt file. Also no errors. But when pushing the 2 files to the live server, the website does not show up anymore. I had to take out those lines from htaccess file again. Not too familiar with backend stuff. So, I do not know if there are errors on the live site.

    php_flag log_errors on
    php_value error_reporting 32767
    php_value error_log "error_log.txt"
    Thread Starter RayR75

    (@rayr75)

    No worries, I got it.

    It seems you really need to set a Featured Image for this in the ‘Post‘ sidebar of your post in WordPress itself. I thought any image in your blog post would be considered as a post_thumbnail. I know … newby ??

    • This reply was modified 4 years, 2 months ago by RayR75.
    Thread Starter RayR75

    (@rayr75)

    Joy, you’re a legend ??

    This seems to go right into the direction I was looking for. I will go through the ‘Code Reference’ as you mentioned too.

    Thank you!

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