Fix Drupal 6 menu urls on test server - drupal-6

After restoring a database dump from my Drupal 6 website on a testserver, all menu links link to the original Drupal website instead of the local testserver.
I have tried clearing all caches without result. How can I make the menu links point to my local test server?

Truncate (empty) the cache_menu table. In phpMyAdmin, select your database in the sidebar, then the table, then scroll down and click 'Empty the table (TRUNCATE)'.
The SQL statement would be TRUNCATE cache_menu;.
I assume that you have a backup of the db since you've done a migration. If not, back up the db first.

I found the problem. The i18n module had the url of the original website as url for the main (default) language. Clearing this setting, results in the expected behavior.
Because this setting was not cleared when the i18n module was disabled, I had a hard time finding the this cause.

Related

Cache issue in Sitefinity/IIS, what can i do?

I have a problem which I am struggling to identify. It may be a Sitefinity(CMS)-problem or it may be a IIS-problem.
Explanation:
I have a external database, where the user login-information is stored. When I change my information in the external database the changes does not affect the Sitefinity-page. But if I wait for many hours OR restart the website in IIS, the changes are made and affect the sitefinitypage.
So, as far as I can see this could be either Sitefinity or IIS.
I tried to disable the Sitefinity OutPut Cache, but it did not help.
Now I want to try to do something in IIS, but I am not very familiar with IIS. Do you hae any idea of what should I do/try?
Sitefinit has caching profiles. The standard (default) one should be 20 minutes, sliding expiration if I remember correctly. Go to the page, click Title & Properties. In the dialog scroll down until you see "Advanced" seection. It's probably collapsed by default.
Expand it and see if Caching profile is anything different than "No caching". If so - make it "No caching" and save. Re-test.
This is output cache. You can think of it as saving the html page on the first request and then serving this saved copy. The cache invalidates on multiple events. For example if you publish the page - it will invalidate the cache.

How to get more information from Server about why page is loading so slow initially?

I am using Glimpse and have attached a screenshot of what it tells me on a specific initial page load (after which is cached and loads fine), but when I touch the web.config, this flushes out the cache ofcourse, and the initial page load is what the pic says it is. The most time spent is on the server, but is there a plugin for Glimpse or something else that I can use to find out exactly where the problem is located on the server??
The problem is specifically with this one template, but I can not determine what is taking it soooo long to load initially. Any help is greatly appreciated. The template runs several User Controls, so it would be a lot of code to post up and ties into a Document Type in the back end of Umbraco 4.6.1 CMS. All other Document types seem to work fine, except for this specific one.
In 4.6.1 you should ensure that you have set the value for umbracoDebugMode in the appSettings section of your web.config to true. Once you have done that you can append ?umbDebugShowTrace=true to the url to see a breakdown of the elements on the page and how long they took to load via the trace that gets displayed.
See http://our.umbraco.org/wiki/how-tos for reference

How do you recover deleted site & page nodes from the SharePoint 2010 navigation settings tree view?

My problem is with the Site Navigation Settings admin page:
If you delete a site or page node from the tree view there appears to be no way to recover them. I could create new nodes by hand, but then the menu system no longer dynamically changes to reflect updates to the structure of the sites and pages.
Does anyone know how to recover the original nodes, or even to reset completely?
You can't recover any node that you have deleted in the admin interface - there's no mechanism for that. You can set it back to automatic which will rebuild from the contents of the site.
Only way to recover them is to Restore old SiteCollection backup

Can't add webpart to SharePoint page

On my sharepoint site I am unable to add an existing basic webpart to a page where I've added webparts before. I am a site owner. I am using IE 8. I also work remotely using VPN.
The strange thing is IE won't even open up the EDIT MODE.
When I use Google Chrome, it is able to open up EDIT MODE, and it was also able to open up the Add Web Part popup, but when you actually select a web part and press ADD...nothing gets added to the main page.
The extra strange thing is from Google Chrome, I am able to delete and modify existing webparts.
I've upgraded to IE 9 and the same issue still happens.
i assume the similar issue you would be facing with firefox it seems your css is not compliant with IE8 try using ie8 in campatibility mode or use following querystring parameter at end of ur url
toolpaneview=2 and see what is the result
I had that problem and it appeared that a CSS file was messing up with the Ribbon controls.
Try to disable a CSS file at a time.
Regards,
Pedro
We had this issue (or at least a very similar one) where, in edit page mode, clicking on 'Add a Web Part' had no effect. I was assuming that it is a JavaScript issue. In, I beleive, the same day, it effected both my Production and DEV Site Collections, in IE8, Firefox and Chrome. We restarted all of our servers and ran the config wizard. No good.
We were able to create new pages which seem to be uneffected.
For an existing page, our workaround is to edit the properties of the page, then, down at the bottom, select 'Open Page in Maintenance View'. Select one of the Web Parts and Close it. Note: It seems as though if you unselected the 'Allow Close' checkbox, it wont be on this list. Then click on the 'Go Back to Web Part Page'. Click on the zone where the closed Web Part was. You may now be able to 'Add a Web Part'. If so, the last Web Part folder on the left will be 'Closed Web Parts' which I beleive you can put back (Open) the closed Web Part.
I have see this issue occur when someone else has the current page open in edit mode. Until that person either checks in or undoes there checkout you will not be able to edit the page.

Classic ASP "Down for Maintenance" page

I'm making some changes to a legacy classic ASP application. I've made the changes locally, and now I want to copy the changed files to the server. At the same time, I need to download the Access database, add some fields to some tables, and upload it again. For this reason, I need to be able to stop visitors from modifying the database while this is happening.
My main question is, what is the best way to setup a quick "Down for Maintenance" page that will be shown immediately and no matter which page the visitor requests. The application is already established, so I'd rather an answer that didn't require me to rework the application's architecture.
My second question (maybe this should be a separate question):
Is there a better way to add fields to a db table than to copy it down, modify, and stick it up again? Please forgive if that's a dumb question - I'm new to ASP - new to Windows too.
I only have FTP access to the remote server.
Thanks.
two ways:
1
if you do a server-side include in every asp page you can do a response.redirect in that include to /upgrading.html
2
in global.asa you can do a response.redirect in the session on start event. THis is probably the best way. Will only work for .asp pages, not if the client comes to a .html page.
Do you have any control panel access to the site at all?
When I used to run a number of ASP Classic sites I often turned them off for the five minutes required to do what I needed.
Rude to do to your visitors I know.
As others have said you could redirect to a page, but that won't stop people visiting static content in html pages, but then that probably won't matter, at least it stops them making changes to the mdb whilst you download it.
It's a pity that ASP.net's app_offline.htm doesn't work for ASP classic.
Another option I used to use was to create a default.htm file that had the offline message, and the way IIS was setup default.htm overrode default.asp, so simply uploading default.htm changed the homepage. This of course doesn't stop anyone using any of the other .asp pages.
So no real answer! Sorry.
If you have just FTP access to the server (and no control over the IIS) just insert a response.redirect to the "down for maintenace" page in top of all the asp pages, and remove it when the update is completed.
The changes to the database can be performed with the ALTER TABLE statement.
With regards to the "Down Maintanance" page issue you can and taking mapache's idea a step further if there is an included file (for a header) in each of the pages you can put the Response.Redirect in that one file and upload that in place. This will avoid making changes to all pages.
Another option is to upload a temp html file which will be found first by IIS. In IIS you can set which page name.ext are looked for in a domain/folder. For example when you browse to www.example.com you don't specify the page you are looking for so it could load index.html or index.htm for example depending on setup. It will depend on your hosts configuration setup, but a bit of trial and error I'm sure you can find out which one they use. Common ones for IIS are default.htm, default.html, index.html and index.htm. You can then put it in each of the folders in the website (not ideal I know) and then carry out your maintenance.
When updating databases you can run a migration script, written in sql, to update the schema and data of the db. As you only have FTP access this will require some sort of page you can paste the sql into and run. This however opens security issues so downloading the db, making the changes and then uploading again is probably easier. In addition to doing it this way you can also save the file and you'll have a backup :-)
Hope this helps.
Better than an include file, just use the Global.asa.
In the Global.asa's Application_onStart, add
Application("Offline")= True
at the top of all of your ASP files, add
If VarType(Application("Offline")) = vbBoolean Then If Application("Offline") Then Response.Redirect "App_Offline.htm"
(The double-if gets around the lack of VBScript's short-circuit operators, and therefore any data type errors.)
You could even set the Global.asa code to
Set fso= Server.CreateObject("Scripting.FileSystemObject")
Application("Offline")= fso.FileExists(Server.MapPath("App_Offline.htm"))
Set fso= Nothing
Which would enable the offline page if it exists, like ASP.NET. However, the application start code is only reparsed when the server is reset (using iisreset), or when the Global.asa file is modified, merely adding the App_Offline.htm will not be enough.
Add below code in web.config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
And place app_offline under root folder. This will work.

Resources