I have a theme that has been working the entire time ive been developing the site, now all the sudden randomly, drupal started telling me "This version is not compatible with Drupal 7.x". B
Below is my info file, am I missing something. I havent updated drupal yet so i know nothing changed there the last change I made was update a url in a link. I tried reverting all my changes ive made today back to a version i know for a fact worked fine earlier today, and still nothing.
name = My Thene
description = My Theme.
core = 7.x
engine = phptemplate
stylesheets[all][0] = css/reset.css
stylesheets[all][1] = css/layout.css
regions[featured] = Featured
regions[content] = Content
regions[sidebar_first] = Sidebar first
regions[sidebar_second] = Sidebar second
Im at a lose for what could be causing this, since its been working for so long untill tonight. Any suggestions would be great. Thanks.
I found the problem was unrelated to drupal its self. The site is being hosted in a windows environment and when the files were updated somehow the option to encrypt files became checked , causing php not to be able to read the files.
Related
I have the weirdest issue. When working in the Divi builder everything looks fine but when I save and go to the front it looks like some of the CSS is not being rendered.
This is the simplest website with the most annoying bug. This is the website - https://www.soc-engineering.com/
In the builder it looks like this - https://prnt.sc/9eiHveTYe7-f and on the front the icons are not rendering CSS. The other mayor issue is that when I set different sizes for letters on PC, tablet and phone it only takes the value of the PC version.
What I tried:
Updated WP to the latest version,
Updated Divi to the latest version,
Increased PHP version,
Increased max execution time,
Disabled Static CSS File Generation,
Deleted the whole theme and installed a new one,
Deactivated all plugins
Nothing works...
For the following website that I have made: ifrs.site (WordPress site with custom theme, if that's important), there is an overlap of content by the footer when the browser window is not maximised on desktop, or when viewed on mobile. I fixed this overlap issue in the dev environment, but the live website with the same CSS code as the dev website ends up with a worse overlap.
What is the cause in discrepancy? You can see the differences in code at this github repo: https://github.com/keg504/IFRS-Website-theme-files, in the 2 branches dev-files and master. What is on master is what is used on the site currently.
I'm using Local by Flywheel for the dev environment on Windows 10, and the CSS is run using a webpack configuration on nodejs.
Edit: As Aliqua has requested, I've added the wp_enqueue_style function I'm calling to load the CSS: wp_enqueue_style('our-main-styles', get_theme_file_uri('/bundled-assets/styles.ba56d060f11656536bc3.css'));
The part between styles...css changes whenever npm run build is run in the command line
Depending on your design/setup the css could have attached in the source code a ?ver=1.0.0 or similar. Which means if you have made changes but not updated the version it is still recalling the original file from the cache.
Some developers overcome this by setting the enqueue_script() version part of the array to a date() (including time with hour-min-sec) function. This will mean that everytime the page is refreshed the version is different and it wont recall older versions of the css from the cache.
Search your code for the enqueue script line for the css in question and see if you can set date() to the version value.
Refer to https://www.php.net/manual/en/function.date.php for more information.
Update:
Based on your update, you could replace it with something like this.
wp_enqueue_style( 'our-main-styles',
get_theme_file_uri('/bundled-assets/styles.ba56d060f11656536bc3.css'),
array( $parent_style ), // remove if there is no parent style
date("His")
);
Reference wp_enqueue_style - https://developer.wordpress.org/reference/functions/wp_enqueue_style/
Final Thoughts:
Please note, that this answer may in fact not be the actual solution as much as I have tried to identify your issue. Please refer to https://developer.wordpress.org/ to familiarise yourself with the introductory information in relation to wordpress development. If you are going to want to do more changes to your wordpress CMS, you will need a basic understanding of how to make changes. Please focus some of your research to plugin creation, working with child themes, and how to make your own custom functions. Then you will be able to write better questions, and be able to action the answers in the future.
Best of luck with your development.
This issue started occurring today: the menu links stop working intermittently (I try clicking, and nothing happens) and I can only get them to start working again by doing a few refreshes. Then again, after moving around the menu a few times, the links stop working.
I noticed this problem on the localhost and then, to test it, I uploaded the website to a webspace and the problem is still there (also tried two different computers, clearing cache, etc.).
The test page is here: http://toulouse.xardas.lima-city.de/en/
I have deactivated several plugins and tried retracing my steps to see if anything I did today could have caused it (I mainly worked on changing the image sizes on the main page in CSS), but I couldn't find the cause.
I have tried the trick where you re-save the permalinks once with a new structure, and then change them back to what they were again and save. That didn't help.
I'm at a loss.
Your problem its not related to plugins, your website has 2 critical javascript errors that show up on the console and they seem to be disabling your website Javascript:
jquery.min.js is no able to load.
masonry.pkgd.js is not able to load.
Both errors are occurring because WordPress its trying to load them from a local server of yours (127.0.0.1).
Since your website its not on a local server, you need to change the tag that refers to those scripts and update the src to the real address of those libraries.
You can need to make sure that this script:
<script type="text/javascript" src="http://127.0.0.1/wordpress/wp-content/themes/elisabethzeigt-topmenu/js/jquery.min.js"></script>
Gets replaced with this:
<script src="http://toulouse.xardas.lima-city.de/wp-content/themes/elisabethzeigt-topmenu/js/jquery.min.js"></script>
The only thing that was updated was the initial part of the src: "http://toulouse.xardas.lima-city.de/" instead of "http://127.0.0.1/wordpress/".
Remember: You should to the same to the other script tag of the masonry library.
If you don't know how to replace them: just search for "jquery" and "masonry.pkgd.js" in your functions.php file and you will find the lines of code.
There is a chance that you functions.php has a global variable with the path to your website and you can fix the issue updating that variable instead of the scripts.
I recently moved a wordpress site from my C: drive to a pre-production environment, linux-based machine. The site works well-ish now.
I am using NextGEN galleries there and am using custom gallery theme. This is the problem: After moving, for some reason the galleries refer to the gallery with absolute path of the C: drive, which is obviously not working since this is another machine. I looked into the database to see if there's any value starting with C:\ and indeed I found out several of them and corrected them from C:\xampp\htdocs/wp-content/themes/subspace\nggallery\gallery-subspace.php to wp-content/themes/subspace\nggallery\gallery-subspace.php. However, after refreshing the page which used the gallery in WYSIWYG editor of WP and checking its settings, it stil referred to the template on the C: drive (namely, this is on the "display galleries tab", under "Customize the display settings", it is the value of the "Template" setting).
I checked the database again and there was no path like this in it. I refreshed the page, no difference. I got irritated and went to get a cup of coffee. When I returned, I ran the database query without any modifications again and found this in the wp_options table, option name "_transient_e4ae686b7454a142b0618b1ff15b38f4":
O:8:"stdClass":17:{s:2:"ID";i:4018;s:13:"post_password";s:0:"";s:10:"menu_order";i:0;s:16:"display_settings";a:20:{s:27:"override_thumbnail_settings";s:1:"0";s:15:"thumbnail_width";s:3:"120";s:16:"thumbnail_height";s:2:"90";s:14:"thumbnail_crop";s:1:"1";s:15:"images_per_page";s:2:"24";s:17:"number_of_columns";s:1:"0";s:15:"ajax_pagination";s:1:"1";s:20:"show_all_in_lightbox";s:1:"0";s:23:"use_imagebrowser_effect";s:1:"0";s:17:"show_piclens_link";s:1:"0";s:17:"piclens_link_text";s:14:"[Show PicLens]";s:19:"show_slideshow_link";s:1:"0";s:19:"slideshow_link_text";s:16:"[Show slideshow]";s:8:"template";s:73:"C:\xampp\htdocs/wp-content/themes/subspace\nggallery\gallery-subspace.php";s:19:"use_lightbox_effect";b:1;s:23:"display_no_images_error";i:1;s:18:"disable_pagination";i:0;s:17:"thumbnail_quality";s:3:"100";s:19:"thumbnail_watermark";s:1:"0";s:20:"ngg_triggers_display";s:5:"never";}s:8:"order_by";s:9:"sortorder";s:15:"order_direction";s:3:"ASC";s:10:"exclusions";a:0:{}s:13:"container_ids";a:1:{i:0;i:37;}s:22:"excluded_container_ids";a:0:{}s:9:"sortorder";a:0:{}s:10:"entity_ids";a:0:{}s:7:"returns";s:8:"included";s:20:"maximum_entity_count";s:3:"500";s:6:"source";s:9:"galleries";s:12:"display_type";s:35:"photocrati-nextgen_basic_thumbnails";s:4:"slug";N;s:8:"id_field";s:2:"ID";}
Which, as you can see contains the C:\ path again. I'm 100% positive this wasn't in the database a while ago and repeated the process with the same result (corrected this, waited a minute and it appeared again). Is it possible that this is pulled e.g. from some file?
You can follow the steps mentioned below:
In the wp-admin, go to "Gallery" -> "Other options" then, Click to "Lightbox effects" tab and Click "Show advanced settings" there, you'll find option to change the stylesheet and javascript urls. Change from 'localhost' to your baseurl or ( 127.0.0.1 ). Then save. Thats all.
Let me see if i can help.
Warning : do not try on production, get a dev or appropriate local version running. Also -- can't remember using NextGen, so my advice comes from a desire to do "best" practice in WP.
Easy try : kill cache if used such as JetPack or similar.
Regrading the _transient - should be able to kill -- this link Can I remove transients in the wp_options table of my WordPress install? seems to be dialed in. So if there is a cached element in the mix...bingo.
Next thing is the C:\...stuff rendered in the page source / html? If so, how is it rendered in the page (HTML please)? In other words, what part of the execution is writing C:\... to the page and why? WP has a bad habit of adding the site to the link (grr!). For example image src attribute will have the ``http://``` :
<img src="http://example.com/uploads/whatev..."
And this is written in the wp_posts table (fun migration issues esp if you change url) - so there is a slim possibility that the gallery info with the C drive ref is in the post or similar.
iD10t check: no config setting you missed in gallery? I hope there is not a 3rd party server/storage as #Hareesh mentioned!
Desperation (done this a few times) : dump the MySQL, get a large text editor and search for the string. Remember that weird stuff could be escaped as a " may turn into \" or the use of alternative "safe" quotes. See what can be learned.
Always an option : reinstall in a new WP site and see what/how things go.
If I think of anything else I will add it, but I just spilled how I would try to dissect the issue. GOOD LUCK.
You can use a search and replace tool to replace all C:/... instances with the correct ones.
But be sure to make a full DB backup beforehand, in case something breaks...
I built a module in drupal 7 with ajax support.But now i am in a big trouble, when i am calling the ajax for certain data fetching at that moment due to inclusion of system.menu.css file with the fetched data my website css breaks.
So could you please guide me how can i remove those unnecessary files from ajax fetched data, mainly the css and js files in Drupal 7.
I had exactly the same problem with a site I was working on. It appears in the theme .info file someone had added these two entries:
stylesheets[all][] = css/drupal/system.theme.css
stylesheets[all][] = css/drupal/system.menus.css
I removed them, cleared the theme registry, and the problem went away.