"Undefined" Text In SuiteCRM Instance Headings - database

I get the following error in messages, popups, headings, titles and even the loading bar on a SuiteCRM installation:
"undefined"
in place of where the text should be.
In various SugarCRM forums it has mentioned the following:
Change permissions of cache folder to 777. --> this has been done
already
Remove the file /cache/jsLanguage/en_us.js and clear the browser
cache also. --> tried this already
Remove the cache folder by flushing the cache in Admin > Repair >
Quick Repair and Rebuild within the Sugar application. --> Tried
this already
Change the default values for dir_mode and file_mode to the
following in the file config.php. --> This has been already done
'dir_mode' => 493, // 16
'file_mode' => 420, // 164
None of these solutions seemed to work.
Screenshots:
http://imgur.com/a/6EOL1

It likely not loading the JavaScript language strings as your .htaccess is not correct, likely the URL for your instance has changed from when it was first installed.
Go into Admin->repair and select Rebuild .htaccess File

Related

Trash files inside user-selected folder inside iCloud Drive

My app works with user txt-files (create, change, delete) inside any user-selected folder. I just internally store the bookmark to get access to that user-selected folder and files.
Now, with macOS Catalina when the source folder is inside iCloud Drive, system still allows me to create and edit files. But doesn't allow to trash one. When I try to do it via [[NSFileManager defaultManager] trashItemAtURL: ... ] I get the following error:
Error Domain=NSCocoaErrorDomain
Code=3328
"<filename> couldn’t be moved to the trash
because the volume “<APFS volume name>”
doesn’t have one."
UserInfo={
NSURL=file:///... <filepath>.txt,
NSUserStringVariant=Trash
}
Note: this only happens when the app is sandboxed.
Any ideas how to get the file trashed correctly?
P.S. I know there is a NSWorkspace recycle... method, but it makes an extra deletion prompt that is not suitable for me.
P.P.S. I am still able to use [[NSFileManager defaultManager] removeItemAtURL: ...] method, but I need the target file to be restorable in case user changes his mind.
Ok. Looks like it's a rare case. But if you've got into the same situation, here is what I've ended up with:
There is a deprecated function - FSMoveObjectToTrashSync - that still works just fine. It saved my ass for now.

Fixing 'Invalid Filename' Deploy Error in Hugo

I've deployed my Hugo website using Netlify, but after my latest changes I keep getting the same error that is as follows:
Failed during stage 'deploying site': Invalid filename 'tags/c#/page/1/index.html'. Deployed filenames cannot contain # or ? characters
I can't find any file in my repository that contains such a path and my index.html doesn't contain any of those invalid characters either. I have attempted to revert the changes but I still receive the same deployment error.
Where should I be looking in my repo files to diagnose this problem?
That is pointing to an auto-generated file that lists those pages that have 'C#' as a tag in the front matter. So look for pages that have something like:
tags: [ 'C#']
in it.
In order fix, you will need to change the tag to 'c-sharp' or something similar.
Or - check that preserveTaxonomyNames is not in your site.yml (or is set to false).
This error happens when we use C# tag or other that contains # in our post/markdown because Hugo will generate static files in public folder according to the tag such as tags/c#/index.xml.
We certainly can replace with other tag like C-Sharp or similar but if we still want to see C# tag in our post there is a workaround for that.
After replacing the tag with C-Sharp for example.
tags: ["C-Sharp"]
We need to override html file where this new tag will appear, then replace following code
{{ . }}
with
{{ replace . "-Sharp" "#" }}
Please notice we replace -Sharp with # so that C# will still appear on our post but the url will be [your-site]/tags/c-sharp/ and Hugo won't generate tags/c#/index.xml in public folder. Therefore, we can avoid the error.
This is summarized from here.

How to clear or update the thumbnailPhoto in Active Directory?

I'm able to add a picture to AD with the below code
entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData);
entryToUpdate.CommitChanges();
but when I try to update, I get an error (The specified directory service attribute or value already exists). I'm clearing the picture but it does seem to work.
entryToUpdate.Properties["thumbnailPhoto"].Clear();
I got it working. I had to commit the changes each time.
entryToUpdate.Properties["thumbnailPhoto"].Clear();
entryToUpdate.CommitChanges();
entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData);
entryToUpdate.CommitChanges();

Difficulty with filename and filemime when using Migrate module

I am using the Drupal 7 Migrate module to create a series of nodes from JPG and EPS files. I can get them to import just fine. But I notice that when I am done importing them if I look at the nodes it creates, none of the attached filefield and thumbnail files contain filename information.
Upon inspecting the file_managed table I see that both the filename and filemime fields are empty for ONLY the files that I attached via the migrate module. This also creates an issue with downloading the files.
Now I think the problem has to do with the fact that I am using "file_link" instead of "file_copy" as the file operation I specify. The problem is I am importing around 2TB (thats Terabytes) of image files. We had to put in a special request with Rackspace just to get access to that much disk space on our server. So I can't go around copying from one directory to the next because of space issues. So "file_link" seems like the obvious choice.
Now you probably want to see how I am doing this exactly, so here is the code snippet:
$jpg_arguments = MigrateFileFieldHandler::arguments(NULL,
'file_link', FILE_EXISTS_RENAME, 'en', array('source_field' => 'jpg_name'),
array('source_field' => 'jpg_filename'), array('source_field' => 'jpg_filename'));
$this->addFieldMapping('field_image', 'jpg_uri')
->arguments($jpg_arguments);
As you can see I am specifying no base path (just like the beer.inc example file does). I have set file_link, the language, and the source fields for the description, title, and alt.
It is able to generate thumbnails from the JPGs. But still missing those columns of data in the db table. I traced through the functions the best I could but I don't see what is causing this. I tried running the uri in the table through the functions that generate the filename and the filemime and they output just fine. It is like something is removing just those segments of data.
Does anyone have any idea what this could be? I am using the Drupal 7 Migrate module version 2.2. It is running on Drupal 7.8.
Thanks,
Patrick
Ok, so I have found the answer to yet another question of mine. This is actually an issue with the migrate module itself. The issue is documented here. I will be repealing this bounty (as soon as I figure out how).

DotNetNuke Event Logging format

Using DotNetNuke 5.
I am using the EventLogController along with LogInfo to add custom messages to the event logs in dot net nuke.
Within LogInfo we have a method to Add a Property/Value. I am under the assumption that the Controller.AddLog(logInfo) converts the properties & vlaues into XML using the LogInfo->Serialize method for DNN to store it.
My problem is that I want linebreaks in my message. Is there anyway I can add a newline. "\r\n" wouldn't work, wouldn't work, CDATA escaped wouldn't work. Everything gets escaped through the Log function.
How do I pretty print the log message myself?
Regards, V
Sadly, due to the HTML encoding that is done on all messages, you are going to be out of luck trying to do this in the DNN event Log.
Depending on what/where you are, you have a few options.
You can add them as individual detail lines using properties, see my example below.
You could report on something yourself, using a custom log table or something similar
If you are in the context of a Scheduled Job, you can log to that history, which is NOT escaped.
Examples
Log Properties
objLog = new DotNetNuke.Services.Log.EventLog.LogInfo();
objLog.AddProperty("SecureMyInstall", "Phase 2 Error Processing User Accounts");
objLog.LogTypeKey = DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.HOST_ALERT.ToString();
objLogger.AddLog(objLog);
The content of the logs is displayed as HTML, so you should be able to put <br /> to add line breaks.

Resources