First widget works in Dashcode but not when deployed - widget

My widget does not work once deployed even though it shows no errors in Dashcode. Apologies in advance for my inarticulartness with the terminology. I am a newbie.
To create the widget, I deleted the default .js file and pasted the JavaScript plus XHTML into the HTML page and created the accompanying CSS file.
The only code I can see that is generated is the plist.
I tried opening up all the permissions but nothing seems to change.
The OSX utilities console shows errors which are on lines beyond what there are numbers for in the code.
I don't think the JavaScript/XHTML/CSS is the problem as it works when in a web page and the widget does actually work within Dashcode.
Help appreciated,
Ruby

If you're using Dashcode, don't delete the default JS. file. This is important because it has the loaders necessary to render most of the parts in your widget. You can always add your custom javascript file. It also provides code that will allow it to work properly in Dashcode.

Related

Wordpress - How to prevent stripping comments out of a template

I have a wordpress site that has to integrate with a .NET platform for a client. I simply need to add two commented out pieces of HTML for it to work on the .NET platform end (not our system).
Wordpress keeps stripping it out of the custom template, though. Is there a way around this?
Note: This is not done in the backend editor. This is directly in the template php file that I'm placing these two commented lines of code.
Also note: I already tried Linklays function to modify tinymce to see if that would be a solution, but again this isn't using tinymce since it's hard-coded into the template.
WordPress does no processing at all on any hard coded HTML in the templates, therefore I suspect you probably have some kind of caching plugin active which minified the html or strips out the comments.
Some themes have these caching methods build into them so if you have no caching plugin active it might be a good idea to view the documentation of your theme for any caching methods and related settings.
Maybe also worth looking at the commented code, If you added the code in a PHP block and used a keyboard shortcut to do the comment it might have added it as a PHP comment instead of a HTML comment.
For a comment in every page you can use the wp_footer hook. It will add your HTML to the footer of any page:
Here is the code rip you should add to your functions.php on your theme root directory, you can change it on your server or local project or via Administration Screens > Appearance > Editor:
add_action('wp_footer', 'some_comments');
function some_comments() {
echo '<!-- Write your comments here -->';
}

React - How to modify the html inside root?

Maybe its a stupid question but:
I have an external Typescript-React app implemented into my code, but in order to add some CSS into one particular DIV (which doesnt have .class or #id) i need to reach the HTML code thats its inside root, how can i reach this HTML code?
Obviously i am able to see the code via Dev-tools but these changes doesn’t get saved after refreshing the page, and also I don’t think that modifying the web page via dev-tools could be considered as a good practice…
I tried to find the HTML file but its not inside my files or neither inside node_modules,
Thank you in advance,
Best Regards.
React HTML is all in JavaScript. In the node_modules, look for index.js and see if you can find the className or id attribute.
Alternatively, you can go to the github repo of the component and browse the code files.

wordpress site page not loading correctly

I am a noob to wordpress and not sure how to properly formulate my question, so I added a screenshot of the problem. When I navigate to the site below page is visible. It seems all Css and content is not being loaded properly.
When I click on one of the links the page loads correctly. The site does not have a valid SSL certificate atm and chrome does complain about that, but I never had it before that something like this happens.It doesn't seem to be a browser issue since I tried it on several different browsers.
I also cleaned up the .htaccess file to its default values. I have no idea where to start looking for a solution, any input would be great!
As I wrote in the comment, here is a possible fix to your problem. Put the code inside your functions.php file.
I'm not experienced using this CMS, but your problem seems to be related to the css and js resources loading.
Here and here there are some useful resource where you can find more info on how to handle your custom scripts in wordpress.
<?php
function init_res(){
// the wp_enqueue_style() function is used to load all the custom css files
wp_enqueue_style('scriptname', get_template_directory_uri().'/your/script/path/file.css');
// the wp_enqueue_script() function is used to load all the custom js files
wp_enqueue_script('scriptname', get_template_directory_uri().'/your/script/path/file.js', array('jquery') );
}
add_action('wp_enqueue_scripts', 'init_res');
?>
Note that with the javascript files, the wp_enqueue_script() function will take the array('jquery') param, this will tell to wordpress that the loaded script has the jquery dependency.

Typo3 template changes are not taking effect

I have a website that is managed by typo3. I modified the alt-text of the site logo in my template (index.html) . Much to my surprise the changes did not take any effect in the frontend. I also deleted the cache but nothing happened?
How can I fix this problem?
Every change in template mapped by TemplaVoila must be confirmed by TemplaVoila module. Click it, find the folder with templates and click "Update Mapping" for template(s) marked by yellow warning sign.
Make sure you've modified the correct template (there can be several templates for a page) by viewing the page's TypoScript object browser and verifying that the desired value actually exists.
If that doesn't help there's probably a mistake in your TS and you should show the relevant portions of your template.

Unable to edit 'URL'. The style sheet must be part of the project

I have been getting this error in Visual Studio 2012 every time I try type an element and the class attribute (i.e. <div class="). It will popup and some times it even crashes Visual Studio if I hit enter too fast.
Is there anyway to get rid of this error while still getting the list of all the CSS classes?
I was having the same problem and a little search brought me to the following page:
http://forums.asp.net/t/1586914.aspx?Unable+to+edit+CSS+file+
In a nutshell: Add a fake parameter to the end of your CDN URL to get rid of your errors. This also makes intellisense work correctly.
Example:
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css?parameter=1" rel="stylesheet">
Visual Studio retrieves intellisense from your css to tell you which classes are available.
You have a reference to that css file but of course don't have edit permission. Looks like a bug to me. Try to remove that reference css file and see if problem go away and file a bug.
Are you using bundling? Maybe you could try to use the cdn feature, like this:
bundleList.Add(new StyleBundle("~/Content/themes/24mx/css", "https://cdnurl/bootstrap.css").Include(
"~/Content/bootstrap.css"
)
);
What this will do is use the cdn in release mode and the local css in debug. So just download that css to have it locally and then it will use the cdn when you publish. Maybe that will help. Ideally you should also use a cdn fallback if it fails:
bundleList.Add(new StyleBundle("~/Content/themes/24mx/css", "https://cdnurl/bootstrap.css"){ CdnFallbackExpression = "javascript expression" }.Include(
"~/Content/bootstrap.css"
)
);
Exactly how to write this expression for a css I haven't really looked into myself.
Can you please check if there is any online refernce to css like
netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
in your codes. Also please check with a local version of css in that case.
If you change the rel attribute to
<link rel="stylesheet nofollow"...>
This is a work around. From what I can see the problem seems to be that visual studio is trying to adjust the line endings but does not have write permissions. From comments I've found on the web you need to be careful with this as YUI and some versions of IE may not work properly with the nofollow rel value. Personally, I would remove the nofollow before publishing live. A bit of a hassle, but I think it does answer your question as it does avoid the popup box.
Your web pages need to be either under a Web Site or a Web Application project to be able to edit linked style sheets. Here is what you need to do:
1.Tools->Options->Projects and Solutions
2.Check “Always show solution”
3.Right click on the Solution node in the Solution Explorer
4.Choose Add new Web Site or new Web Application project
5.Move your web pages to the new Web Site or Web Application project
Now you should be able to edit the linked style sheets.
Hope this helps