Joomla 1.7 menu-type adding - joomla1.7

I created a 1.7 component using Not Webdesigns Component Creator. They saved me a bunch of time in 1.5 so now Im finally switching to 1.7 coding I used them again for the basic outline of my components.
Now everything works and installs fine. Everything shows up and Joomla finds index.php?option=com_dealers (Its called com_dealers obv.) Just when I hit menu type in the menumanagement, there is no shortcut to my component. How do I add it to that list? A simple xml etc... was enough in 1.5 but it obviously isnt now...
Greetings,

Solution found, so Ill post it here, since I guess a lot of people will have this same problem using the creator.
The creator forgets one xml. Namely default.xml in site/views/COMPONENTNAME/tmpl . Add a default.xml there with the following content
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COMPONENTNAME">
<message>COMPONENTNAMEFront End view</message>
</layout>
</metadata>

Related

Flutter : Project Files Missing From IDE

I'm having this issue across all my Flutter projects, thinking it was something wrong I did I opened the Flutter Gallery project but it turns out this problem is present on that project as well. I can't figure out what's wrong because the files for all the projects are there on my File Explorer yet do not display on my IDE. How do I go about correcting this because I do not have an idea at the moment. I've attached images for some visuals
On another post I saw that you need to change this
<?xml version="1.0" encoding="UTF-8"?>
To this
<?xml version="1.0" encoding="UTF-16"?>
But then this happens
And this
Something to note is that changing the UTF from 8 to 16 is inconsistent across projects. For my one project it worked but for this particular one it didn't because not only is it displaying the wrong class in my main.dart it also only shows half of that entire class. The HomePage is unreadable. Some very weird behavior. Because of these inconsistencies I found that this 'solution' isn't the best hence I'm looking for an alternative.

Exception when trying to use icons from Asset Catalog in iOS project with Xamarin TabbedPage

I create a Xamarin Forms project in VS 2017 and started by adding a TabbedPage with three tabs. I then added the icons to the Android (in Resources/drawable) and iOS (Asset Catalogs/Icons) projects.
When I start the project on Android it works fine, but on iOS I get an exception that the UIImage cannot be loaded because initWithCOntentsOfFile returned nil. Which is actually correct, because that's not the correct method to use to access Assets. But it's the TabbedPage calling the method, so I cannot do anything about it.
The TabbetPage looks pretty basic.
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:GreenThumb"
x:Class="GreenThumb.MainPage">
<NavigationPage Title="Today" Icon="current.png">
<x:Arguments>
<local:Current />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Overview" Icon="overview.png">
<x:Arguments>
<local:Overview />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Settings" Icon="settings.png">
<x:Arguments>
<local:Settings />
</x:Arguments>
</NavigationPage>
</TabbedPage>
And the Asset Catalog looks like this:
This problem seems to be pretty old, but I haven't found any solutions aside some very dirty hacks.
Is there a clean solution out there? Or do I just have to add all my images in the Resources folder instead of Asset Catalogs?
I struggled in the past on this issue. It seems that icons for tabbed pages are not working in iOS if placed in the .xcassets.
I moved those .png files inside the Resources folder and that made the magic.
I suppose it's a kind of bug on Xamarin.
The same error was occurring to me, and I was putting the images on the .xcassets on iOS.
When I placed the images on the Resources folder, they appeared normally on my TabbedPage.
In the official Xamarin documentation about images, they say to put the images in the Resources folder.
iOS - Place images in the Resources folder with Build Action:
BundleResource. Retina versions of the image should also be supplied -
two and three times the resolution with a #2x or #3x suffixes on the
filename before the file extension (eg. myimage#2x.png).
I place all my images in the .xcassets folder, they apparently work well, but it seems not to work on every case.

Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?

I've created and "deployed" my latest Web Part (Visual Studio grins from ear-to-ear, and tells me, "Deploy succeeded").
But when I go to our Sharepoint site, and my "sandbox" page, and Edit it, I do not see the WebPart. As the Elements file shows, it should be available from the "Financial Affairs Forms" category:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="PostTravelExpenseWebPart" List="113" Url="_catalogs/wp">
<File Path="PostTravelExpenseWebPart\PostTravelExpenseWebPart.webpart" Url="PostTravelExpenseWebPart.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Financial Affairs Forms" />
</File>
</Module>
</Elements>
However, that category is devoid of the "PostTravelExpenseWebPart" I expect (or at least hope) to see there:
What might I be omitting?
UPDATE
I even went so far as to, while in Edit mode on the Web Page, expand the "Upload a Web Part" section below "Categories" after selecting one of the "Add a Web Part" links. I didn't know exactly what to upload (when browsing for a file, the File Dialog doesn't clue you in on what file extension it expects), so I, on a flayer, tried uploading PostTravelExpense.ascx
It accepted it without balking, but I do not see it anywhere (nor do I know why just the *.ascx file would be enough, but again, which file does it expect?) It doesn't allow me to upload the entire project folder.
UPDATE 2
In response to the comment below, note that The project's Assembly Deployment Target" property is set to GlobalAssembyCache
By comparing a working project with this one, I was finally able to get it to deploy without the "A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe." add-time error msg.
What I had to do was check every place in the working project where the primary namespace was referenced, and make sure that the corresponding namespace in the previously-unworking project was referenced in those same places
This required not only changing some of the files visible in Visual Studio's Solution Explorer treeview, but also two that I only was able to load into the editor by searching for strings they contained, specifically:
The ***.spdata** file, which I loaded up by searching for "SafeControl"
**Assembly.Info**, which I loaded up by searching for "AssemblyTitle"
That sure was a lot of hand-wringing and head-banging and pitiful whin[g]ing for something that one would think would automatically be taken care of by the IDE - when a namespace changes, make all the necessary changes, or at least notify the coder and offer to do so! Or, barring that, at the very least give him a better clue than "A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe." when the WebPart to be plopped onto the page proves unploppable.

Struts 2 + Export to Excel NOT working in IE6 (Works in IE7 and Firefox)

I have implemented export to excel feature in struts 2 using apache POI.
It works in IE7 and Firefox on Windows XP.
But does not work in IE6. The pop up dialog to open or save excel does not show up on IE6.
I get no errors or exceptions.
This is the result type.
<action name="exportToExcelRIQueue" class="queuesAction" method="exportToExcelRIQueue">
<result name="export.to.excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">attachment; filename="RequiringInstructions.xls"</param>
<param name="bufferSize">1024</param>
</result>
</action>
I found this thread on the Sun Forums discussing issues with downloading attachments in IE. Unfortunately none of them point to a specific cause. You may want to change your contentType from application/vnd.ms-excel to a more generic application/octet-stream and see if that works.
This problem is solved now. Issue with the Custom link tag.
I was using a custom link tag(designed by company as part of UI standard) to invoke the action. Unfortunately this custom tag had issues in IE6.
I have replaced it with html anchor tag <a></a> . And used javascript to submit the struts 2 form.
It works perfectly in IE6. Opens up a pop up dialog to open or save Excel returned from Struts 2 result. :)

Faulty pages created by SiteDefinition

I'm creating some pages using a SiteDefinition, the markup looks something like this:
<File Url="Page.aspx" Name="$Resources:SiteDefinitions,PageName;" Type="GhostableInLibrary">
<Property Name="Title" Value="$Resources:SiteDefinitions,PageTitle;" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/Somepage.aspx"></Property>
<AllUsersWebPart WebPartZoneID="WebPartZone1" WebPartOrder="1">
-- webpart data here
</AllUsersWebPart>
</File>
The page is created as expected, but it's somewhat faulty. If for instance I click Edit Page and then click Publish (without actually editing anything) I will get this error:
"This Page has been modified since you opened it. You must open the page again."
I will get this error approx. every second time I try an editing action.
If I manually create a page using the same page layout everything works as expected and this error does not show up.
Does anybody have an idea what could be wrong?
I too create a Page using the above method only thing I found missing in your code is that I used to have a title in the PageLayout as
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/Somepage.aspx, Your title"></Property>
This should not be the cause, but you can try it, Also refer the articles this or this
I think you're right with using PublishingLayoutPage. I came across this article today while searching for this error caused by something else. It describes your same issue although the person in the article was not inheriting from PublishingLayoutPage and had not specified the PublishingPageLayout property. When they fixed this it worked.
This doesn't directly help you, although I did notice in their article that they are specifying the ContentType property. Have you tried specifying this? As you can see your complete code, are there any other differences you see from the article or additional information from the comments?
Okay, I (kinda) got this working now.
The guy who had made the ONET.xml had put a reference to the page layout in the Url attribute of the element.
Like I wrote in a comment earlier I tried making the page layouts inherit from TemplateRedirectionPage. Instead I now made an empty default.aspx file that inherits from TemplateRedirectionPage and changed all my page layout files back to deriving from the PublishingLayoutPage. And then I added the PublishingPageLayout element below every element.
Funny, or oddly, having a refence to the page layout in the Url attribute and not having the PublishingPageLayout element at all is actually valid. It doesn't make sense, because it will produce these faulty pages, but SharePoint actually accepts it and spits out all the pages defined in the ONET.xml
Only thing left now is that since I made the above changes, when I manually create a new page based on a page layout every default webpart (as defined with AllUsersWebPart) is instantiated 5 times. Really don't know where this behaviour is coming from, but at least it's not as serious as not being able to edit/publish my pages :)

Resources